Skip to content

Instantly share code, notes, and snippets.

@zachwalton
Last active February 19, 2016 20:26
Show Gist options
  • Save zachwalton/65cfdfddbe0c8f594c6b to your computer and use it in GitHub Desktop.
Save zachwalton/65cfdfddbe0c8f594c6b to your computer and use it in GitHub Desktop.
GOOOOOOOOAL
zach (python):
import inspect
def g(v=None):
f=str(inspect.currentframe().f_back)
if not v:
g.__dict__[f] = g.__dict__[f] + 'O' if g.__dict__.get(f) else 'GO'
return g
print g.__dict__.pop(f, 'G') + 'AL'
jon (python):
class g(object):
S = 'G'
def __call__(self, s=None):
if isinstance(s, str):
self.S += s.upper()
print self.S
else:
self.S += 'O'
return self
jared (js):
function g(x){if(x)return 'g'+'o'.repeat(g.n)+ x;var f=eval('('+g.toString()+')');f.n=~~g.n+1;return f}
zach (python):
import inspect
def g(v=None):
f=str(inspect.currentframe().f_back)
if not v:
g.__dict__[f] = g.__dict__[f] + 'O' if g.__dict__.get(f) else 'GO'
return g
print g.__dict__.pop(f, 'G') + 'AL'
jon (python):
class g(object):
S = 'G'
def __call__(self, s=None):
if isinstance(s, str):
self.S += s.upper()
print self.S
else:
self.S += 'O'
return self
jared (javascript):
function g(x){if(x)return 'g'+'o'.repeat(g.n)+ x;var f=eval('('+g.toString()+')');f.n=~~g.n+1;return f}
jed (python):
def g():
def o(end=None):
if end is not None:
return o.__state__ + end.upper()
o.__state__ += "O"
return o
o.__state__ = "GO"
return o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment