Amaury Forgeot d'Arc added the comment:
I'd use a much simpler encoding.
Maybe something like
name.encode('unicode-escape').replace(b'\\', b'_')
As you said, simplicity is important for tools which generate code!
----------
nosy: +amaury.forgeotdarc
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20485>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com