Message221

Author nickm
Recipients
Date 2000-12-12.05:45:11
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Although python2.0 introduces "as" as a keyword, it allows it to appear where it would ordinarily be acceptable, as in:

def fn(as): as = as + 1; return as
fn(as=3)
class as: pass

This feature allows for backward compatibility with code written for earlier versions of python.  I actually have some such code

Jython (as in CVS as of 12 Dec 2000) does not allow this.  I believe that adding it would be as simple as replacing the declaration for Name
in python.jjt to allow <AS> as an alternative for <NAME>, but I haven't tried this out myself, due to unfamiliarity with the codebase.
History
Date User Action Args
2008-02-20 17:16:46adminlinkissue225440 messages
2008-02-20 17:16:46admincreate