works for me because of :
I don't suppose that there is any chance of an ObfuscatedPython Contest, is there?
- lack of braces - I often forget them or lose them in other languages
- smallest amount of typing - many other languages seem verbose to me
- whitespace - indentation as block delimiting makes it easy for me to read.
- Really intuitive syntax for returning multiple objects from a function.
- Array slice notation (yes we know Python wasn't the first)
- Actually, there is, but it mostly involves lambdas and using both tabs and spaces.
Mmm... who can guess what the following code prints?
print (lambda x:"print %s(%s)"%(x,repr(x)))('(lambda x:"print %s(%s)"%(x,repr(x)))')
Neat, but not surprising. I like this old one from TimPeters
Just how old would that be? '__methods__' appears not to exist in Python 2.3...
Maybe the following works in newer Python:
and of course ...
#!/usr/local/bin/python -- -export-a-crypto-system-sig -RSA-in-4-lines-Python
from sys import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
Wear that on a t-shirt in asia and you're stylin'!
Oops, is this wiki now a munition?
Nah, they relaxed the export prohibitions.