Here’s my answer to a friend’s question “what innovative features do you see in python”
- * decorators. Very powerful. Perhaps somewhat similar to AOP. Python probably borrowed it from Haskell?
- * dynamic method/attribute lookup. Somewhat similar to C# “dynamic” keyword. Dangerous technique similar to java reflection.
- * richer introspection than c# (which is richer than java)
- * richer metaprogramming support (including decorator and introspection) … Vague answer!
- * enhanced for-loop for a file, a string,
- * listcomp and genexpr
- * Mixin?
- I wrote a code gen to enrich existing modules before importing them. I relied on hooks in the importation machinery.