Stupid Python Trick

From the source code is free speech department: python source code expresses meaning by outwardly contradicting that meaning.


__import__('sys',map(lambda x: getattr(globals(),'setdefault')(*x),[('_',getattr),('__',__import__),('__l', list('sd'))])).stdout=open('/dev/null','w')
_(__('os', map(lambda x: _(globals(),'setdefault')(*x),zip(__l,map(lambda x:_(__('this'),x),__l)))),'write')(1,''.join([d.get(c,c) for c in s]).split('\n')[int(_(__('sys'), 'argv')[1])+2]+'\n')

irony.py

Example usage:


$ python irony.py 0
Beautiful is better than ugly.
$

Mon, 30 Apr 2007 22:54

Comments: 0

Reader Comments

Add a Comment

  • Only the name field is mandatory. It's hard to keep track of a conversations where everyone is Anonymous.
  • If you choose to leave an email address, it will not be shown on the page.
  • A limited subset of HTML is allowed in your comment.

Name

Email

URL


Comment: (Limited HTML allowed.)