Proposal: allow '?' and '!' in identifiers
piet at cs.uu.nl
piet at cs.uu.nl
Wed Feb 21 09:39:18 EST 2001
>>>>> Joshua Marshall <jmarshal at mathworks.com> (JM) writes:
JM> Christoph Horst <rc-bashar at gmx.net> wrote:
>> Nathaniel Gray <n8gray at caltech.edu.is.my.email.address> 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 cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl
More information about the Python-list
mailing list