On Sun, Jun 04, 2017 at 02:36:50AM +1000, Steven D'Aprano wrote: > But Python 3.5 does treat it as an identifier! > > py> ℘ = 1 # should be a SyntaxError ? > py> ℘ > 1 > > There's a bug here, somewhere, I'm just not sure where...
That appears to be the only Symbol Math character which is accepted as an identifier in Python 3.5: py> import unicodedata py> all_unicode = map(chr, range(0x110000)) py> symbols = [c for c in all_unicode if unicodedata.category(c) == 'Sm'] py> len(symbols) 948 py> ns = {} py> for c in symbols: ... try: ... exec(c + " = 1", ns) ... except SyntaxError: ... pass ... else: ... print(c, unicodedata.name(c)) ... ℘ SCRIPT CAPITAL P py> -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/