[Python-ideas] What about allowing '?' in method names?
Guido van Rossum
guido at python.org
Thu Aug 6 20:57:25 CEST 2009
Adding '?' to identifiers in Python ain't gonna happen.
On Thu, Aug 6, 2009 at 11:11 AM, Lucas Prado
Melo<lucaspradomelo at gmail.com> wrote:
> On Thu, Aug 6, 2009 at 12:16 PM, Greg Falcon <veloso at verylowsodium.com>
>> On Wed, Aug 5, 2009 at 9:01 PM, Tennessee
>> Leeuwenburg<tleeuwenburg at gmail.com> wrote:
>> > def shouldSomethingHappen?(self, context):
>> > 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.
>> Two problems I immediately see with this:
>> 1) '?' is punctuation, and uninitiated readers are likely to guess
>> that it is some sort of postfix operator.
> Actually, Ruby allows this notation and, until now, I have not seen many
> complains about it.
> Despite that, its use would be pretty clear for the beginner, since it would
> be associated with meaningful identifiers:
> The worst problem could be the useless parenthesis after the '?' sign.
>> 2) IPython gives a special meaning to ?, and it would be a shame to
>> collide with that.
> IMHO, IPython might not be mature enough to interfere with Python design
> decisions yet.
> Python-ideas mailing list
> Python-ideas at python.org
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-ideas