Proposal: allow '?' and '!' in identifiers

piet at piet at
Wed Feb 21 09:39:18 EST 2001

>>>>> Joshua Marshall <jmarshal at> (JM) writes:

JM> Christoph Horst <rc-bashar at> wrote:
>> Nathaniel Gray <n8gray at> wrote:
>>> IMHO it's not worth adding "!", but if "?" doesn't break anything then it's 
>>> a net gain.  I assert that it _would_ make Python more expressive to add an 
>>> elegant way of indicating that a function returns only boolean values.

>> What's wrong with prefixing the function name with 'is'?

JM> I wouldn't say anything is wrong with that approach.  But then I could
JM> also ask "Why do we need underscores as valid identifier characters?
JM> You can just capitalize the next letter."
JM> The question mark is an unused character, and carries some
JM> natural-language meaning.  It's useful.

Please don't do it. There are more useful things to do with ? like the
ternary operator for conditional expressions.
Piet van Oostrum <piet at>
Private email: P.van.Oostrum at

More information about the Python-list mailing list