[Python-ideas] relaxing keyword usage restrictions
pyideas at rebertia.com
Wed Sep 7 20:39:52 CEST 2011
On Wed, Sep 7, 2011 at 6:40 AM, Devin Jeanpierre <jeanpierreda at gmail.com> wrote:
> On Tue, Sep 6, 2011 at 9:01 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>> Nick Coghlan wrote:
>>> class Foo:
>>> normal = 1
>>> 'class' = 'This is probably a terrible idea'
>>> '1234' = 'as is this'
>>> 'or does it' = 'have some merit?'
>> Could be rather confusing, since the interpretation of a string
>> literal would depend somewhat subtly on its position in an
>> expression. And it's not just a LHS/RHS distinction, because
>> presumably the following would still parse with all the string
>> literals being literals... or would it?
>> 'foo'['blarg'] = 'asdf'
> I seem to remember them being banned for all use in Python
> forever, but backticks
Indeed; see PEP 3099. "No more backticks."
More information about the Python-ideas