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.ma...@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 .? > > Example: > > class A (): > \global = 'Hello' > def __init__(self): > self.except = 0 > > def \finally(self): > return 'bye' > > print(A.global) > a = A() > a.except += 1 > print(a.finally()) > > or with a module, in my_module.py: > > \except = 0 > > elsewhere: > > import my_module > print(my_module.except) > > or > > from my_module import \except > print(\except) > > Best, > Wolfgang > > > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/