[Python-ideas] Verbatim names (allowing keywords as names)

Carl Smith carl.input at gmail.com
Wed May 16 17:09:56 EDT 2018


> We can and do preempt someone sabotaging keywords by not letting anyone
override them.
> That is the whole point of using reserved keywords. Some languages allow
you to change
> important words, some don't.  Guido made a conscious decision to make
certain words keywords,
> and to not let anyone change them, I believe to avoid the sorts of issues
I have brought up.
> You are talking about removing one of the most important and
long-standing protections the
> language has in place.  That is not a small change.

Making names keywords requires that keywords also be names. If Guido is
open to introducing
keywords that are currently names, it cannot be lost on him that some code
will use names that
are now keywords.

If your position is that Guido shouldn't introduce keywords that are
currently used as names at all,
fair enough; that'd be my first choice too. But, if we are going to do it, I
have a strong preference for
a specific approach.


-- Carl Smith
carl.input at gmail.com

On 16 May 2018 at 20:40, Todd <toddrjen at gmail.com> wrote:

> On Wed, May 16, 2018 at 2:17 PM, Carl Smith <carl.input at gmail.com> wrote:
>
>> > Not if you need to make changes in the same tens of thousands of lines
>> file.
>>
>> But what has that got to do with the the syntax of the new code? The old
>> code is
>> what it is.
>>
>>
> Again, because you end up with hard-to-debug issues through no fault of
> your own.
>
>
>> I did think after I replied that `True` wasn't actually reserved until
>> more recently, but
>> the point still stands: You would be able to reference the name *as
>> defined* in an
>> external library, and yeah, it could refer to anything, but that's kinda
>> the point. We
>> have to assume the library does something sane with the name. We can't
>> preempt
>> an employee sabotaging `True`.
>>
>>
> We can and do preempt someone sabotaging a keywords by not letting anyone
> override them.  That is the whole point of using reserved keywords.  Some
> languages allow you to change important words, some don't.  Guido made a
> conscious decision to make certain words keywords, and to not let anyone
> change them, I believe to avoid the sorts of issues I have brought up.  You
> are talking about removing one of the most important and long-standing
> protections the language has in place.  That is not a small change.
>
>
>> -- Carl Smith
>> carl.input at gmail.com
>>
>> On 16 May 2018 at 16:40, Niki Spahiev <niki.spahiev at gmail.com> wrote:
>>
>>> On 16.05.2018 16:05, Andrés Delfino wrote:
>>>
>>>> IMHO, it would be much easier to learn and understand if keywords can
>>>> only
>>>> be used by escaping them, instead of depending where they occur.
>>>>
>>>
>>> There can be 2 escape characters '\' and '.'
>>>
>>> Niki
>>>
>>>
>>>
>>> _______________________________________________
>>> Python-ideas mailing list
>>> Python-ideas at python.org
>>> https://mail.python.org/mailman/listinfo/python-ideas
>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>
>>
>>
>> _______________________________________________
>> Python-ideas mailing list
>> Python-ideas at python.org
>> https://mail.python.org/mailman/listinfo/python-ideas
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180516/b1295bae/attachment-0001.html>


More information about the Python-ideas mailing list