By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,714 Members | 750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,714 IT Pros & Developers. It's quick & easy.

Obfuscated Python: fun with shadowing builtins

P: n/a
I was compelled to write this today for some reason.

builtins = """__import__ abs basestring bool callable chr
classmethod cmp compile complex delattr dict dir
divmod enumerate eval execfile file filter
float frozenset getattr globals hasattr hash help hex
id input int isinstance issubclass iter len list
locals long map max
min object oct open ord pow
property range raw_input reduce
reload repr reversed round set setattr
slice sorted staticmethod str
sum super tuple type unichr
unicode vars xrange zip"""

unicode=lambda long:apply(long.split);float=lambda int:getattr(__builtins__,unicode(builtins)[15])(unicode(builtins)[int]);staticmethod,long=lambda long:float(int(str(1)*int(2))*unicode(builtins).in dex(long.__name__)), lambda staticmethod:unicode(apply(builtins.splitlines)[staticmethod]);int=float(0)(apply(str).join(unicode(builtins)[staticmethod(bool)(long(2*int))][staticmethod(bool)(long(2*int+1))] for int in staticmethod(classmethod)(staticmethod(bool)(long(-1)))))

Enjoy ;)
Michael Hoffman
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
very good.



Jul 18 '05 #2

P: n/a
Michael Hoffman wrote:
Enjoy ;)

That's not the exact word that first came to my mind :)
Jul 18 '05 #3

P: n/a
fraca7 a écrit :
Michael Hoffman wrote:
Enjoy ;)

That's not the exact word that first came to my mind :)

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.