[Python-ideas] What about allowing '?' in method names?
masklinn at masklinn.net
Wed Aug 12 09:32:01 CEST 2009
On 12 Aug 2009, at 02:21 , Steven D'Aprano wrote:
> On Wed, 12 Aug 2009 05:56:24 am Masklinn wrote:
>>>> I'd heard the Python community
>>>> was pretty big on smart conventions but I might be wrong.
> And would accepting or rejecting this proposal prove that we're big on
> smart conventions?
That's not what I wrote.
>>> But what is the advantage of "?" to "is_" then?
>> I think it's easier to spot due to 1. being a fairly rare character
>> in programs (in languages where the ?: ternary doesn't exist anyway)
> It's certainly rare in Python, because it's illegal (except in strings
> and comments).
Which is exactly what I said, but thanks for repeating it.
> Notice the inconsistency -- method and function calls which return a
> bool have a question mark, but operators do not. I hope you're not
> going to suggest changing `is` to `is?`.
That's an interesting point.
More information about the Python-ideas