Proposal: allow '?' and '!' in identifiers
grumble at mailcity.com
Sun Feb 25 11:36:31 EST 2001
Erik Max Francis <max at alcyone.com> wrote:
> Nathaniel Gray wrote:
>> Why not be hardcore and allow both?
> Because using a suffixed p to indicate predicates, if that is your
> liking, is already supported by the language. Allowing ? in identifiers
> is not, and would require all sorts of weird parser logic to allow it in
> identifiers but not break backward compatibility. It is simply not
> worth it.
I understand that you dislike the idea of allowing '?' in identifiers.
But it would not necessarily require "all sorts of weird parser
logic". I expect it's a simple change to the lexer. I haven't looked
at the Python codebase, so I don't know for sure. But I've written
enough lexers and parsers to know what should be easy or difficult.
More information about the Python-list