Proposal: allow '?' and '!' in identifiers
Michael Hudson
mwh21 at cam.ac.uk
Sun Feb 25 13:02:28 EST 2001
jcm <grumble at mailcity.com> writes:
> 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.
It is. It takes about a minute if you know where to look (which is in
Parser/tokenizer.c). I did it once, but seem to have lost the patch.
Cheers,
M.
--
ARTHUR: Yes. It was on display in the bottom of a locked filing
cabinet stuck in a disused lavatory with a sign on the door
saying "Beware of the Leopard".
-- The Hitch-Hikers Guide to the Galaxy, Episode 1
More information about the Python-list
mailing list