[Python-ideas] Verbatim names (allowing keywords as names)
adelfino at gmail.com
Wed May 16 09:05:33 EDT 2018
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.
On Wed, May 16, 2018 at 9:13 AM, Wolfgang Maier <
wolfgang.maier at biologie.uni-freiburg.de> wrote:
> On 16.05.2018 02:41, Steven D'Aprano wrote:
>> Some examples:
>> result = \except + 1
>> result = something.\except
>> result = \except.\finally
> Maybe that could get combined with Guido's original suggestion by making
> the \ optional after a .?
> class A ():
> \global = 'Hello'
> def __init__(self):
> self.except = 0
> def \finally(self):
> return 'bye'
> a = A()
> a.except += 1
> or with a module, in my_module.py:
> \except = 0
> import my_module
> from my_module import \except
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas