[Python-ideas] What about allowing '?' in method names?

Xavier Ho contact at xavierho.com
Thu Aug 6 09:50:34 CEST 2009

On Thu, Aug 6, 2009 at 11:01 AM, Tennessee Leeuwenburg <
tleeuwenburg at gmail.com> wrote:

> this could be nicer than prefixing things with is, and makes things clearer
> in some cases, e.g.
> def shouldSomethingHappenFlag(self, context):
>    if 'relevant' in context:
>      return True
>    return False
> vs
> def shouldSomethingHappen?(self, context):
>   if 'relevant' in context:
>     return True
>   return False
> I just think it looks nicer, and is a good hint that a true/false or other
> kind of flag is likely to come back.

What about

hasSomethingHappened(self, context)


isRelevant(self, context)

Either way.. I think ? has better uses though.


Ching-Yun "Xavier" Ho, Technical Artist

Contact Information
Mobile: (+61) 04 3335 4748
Skype ID: SpaXe85
Email: contact at xavierho.com
Website: http://xavierho.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090806/7b73d51f/attachment.html>

More information about the Python-ideas mailing list