On Wed, Jun 11, 2008 at 5:27 PM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote: > If I recall correctly, Jython handles this by appending a trailing > underscore to the imported name and there's no reason why we couldn't > do something similar. In truth the current implementation of Jython allows keywords in many strange places, I expect this was done to allow for method names that are not keywords in Java so, for example, if there is a method called "print" in a Java class that we want to call (quite common) then it can be called. As far as I know appended underscores don't enter into it. Some poking around reveals that the current Jython is probably too lax here, even keywords that are common to both Python and Java can be method names (like "if"). I plan to continue to allow Python keywords that are not Java keywords to behave this way at least for the 2.x series, though I don't think I'm going to go through the effort of allowing keywords common to both Java and Python like "if" (The 2.5 version of Jython will have a new parser so I do actually need to make these explicit choices right now). I think changing this behavior would hurt backwards compatibility too much. Maybe I'll rethink it in our 3.0 timeframe. If a convention like a trailing underscore is adopted we might move to that in the move to 3.0.
-Frank _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com