[Python-ideas] What about allowing '?' in method names?
tleeuwenburg at gmail.com
Sat Aug 8 03:07:30 CEST 2009
Well, the thread's basically concluded, but I'm not sure if it's appropriate
to just 'leave it hanging' seeing as I instigated the thread. So thanks all
for the discussion points and I think we can wrap things up now. Please feel
free to comment on the summary below if you think it doesn't have all the
To summarise the discussion for posterity:
On the Plus Side:
? is part of English grammar, and is an intuitive clue-in that a yes/no,
true/false response is expected as a result. Some people (myself included)
would find this an aesthetically pleasing way to label methods which will
come back with a flag.
On the Negative Side:
? looks like an operator, not part of the method name, and might confuse
It wasn't mentioned much, but of course there is all the work involved to
change the Python grammar!
It could collide with external dependencies such as IPython
It was decided this would not be adopted.
A couple of idioms were suggested, such as a trailing capital Q instead
(in my mind, Q for question) of the ?, or _p for predicate. It's possible
people may find it useful to adopt or further discuss such idioms.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas