Extending Python Syntax with @

DH no at sp.am
Wed Mar 10 20:37:29 EST 2004


I would prefer "anonymous" or "implicit" things be referred to by 
nothing at all instead of @.  For example, instead of "self.x", just 
have ".x".  Instead of lambda, allow for unnamed "def" code blocks with 
[] or () to allow for multiple lines.
def (optional params) [optional decorator]: [
   some code here...
   ]

Some things I might like to see in python, in no particular order:
   - an "=~" operator
   - pychecker bundled with python, since it catches so many errors
       beginners and non-beginners make.
   - allow for curly braces to specify a multi-line code block so []
       and () are not abused.
   - use the keyword "function" instead of "def"
   - make colons optional after function and class declarations.  People
       forget to type them anyway.
   - be able to refer to variables case-insensitively though they
       are still stored case-sensitively.  Make keywords like None,
       True, and False case insensitive.
   - no more "self" parameter required for class methods.  If need be,
       maybe class instance methods could be specified by
       starting the name with "."

Of course, the chances of any of these happening in python = None, so a 
better long term idea is to make it easier for people to create custom 
scripting languages for a common virtual machine like jvm, parrot, maybe 
python in python (pypy), etc.
http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.html
http://codespeak.net/pypy/index.cgi?home
http://www.parrotcode.org/



More information about the Python-list mailing list