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

Joshua Marshall jmarshal at mathworks.com
Mon Feb 19 22:43:24 EST 2001


David Allen <s2mdalle at titan.vcu.edu> wrote:
...

>> If the addition of '!' as a valid identifier character causes too many
>> waves, it would still be nice to see '?'.

> Why?  How would this make the language more expressive?
> How would it make your programming tasks easier?

> Is introducing new and strange behavior (such as your
> a!=b example) worth it?  Why?

Introducing some strange behavior with '!' may very well not be worth
it.  However, while adding '?' as a legal identifier character does
not make the Python more expressive, it can make Python programs more
self-documenting.  The convention of ending predicate function names
with '?' is useful, in my opinion.



More information about the Python-list mailing list