This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author outofculture
Recipients ezio.melotti, outofculture, vstinner
Date 2020-12-19.00:27:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608337638.31.0.282266859185.issue42680@roundup.psfhosted.org>
In-reply-to
Content
This behavior is best described by the code below:

```
>>> meow = 1
>>> 'meow' in globals()
True
>>> µmeow = 1e-6
>>> 'µmeow' in globals()
False
>>> globals()['woof'] = 1
>>> woof
1
>>> globals()['µwoof'] = 1e-6
>>> µwoof
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'μwoof' is not defined
>>> import sys
>>> sys.getdefaultencoding()
'utf-8'
>>> [(k, bytes(k, 'utf-8')) for k in globals()]
..., ('μmeow', b'\xce\xbcmeow'), ('µwoof', b'\xc2\xb5woof')]
>>> 'µ'.encode('utf-8')
b'\xc2\xb5'
```

Testing was done on linux and windows, variously using 3.6.12, 3.7.6, 3.8.6 and 3.9.0+.
History
Date User Action Args
2020-12-19 00:27:18outofculturesetrecipients: + outofculture, vstinner, ezio.melotti
2020-12-19 00:27:18outofculturesetmessageid: <1608337638.31.0.282266859185.issue42680@roundup.psfhosted.org>
2020-12-19 00:27:18outofculturelinkissue42680 messages
2020-12-19 00:27:17outofculturecreate