Ma Lin <malin...@163.com> added the comment:

> this limitation to the latin-1 subset is not compatible with the 
> documentation, which says that valid Python identifiers are valid group names.

Not all latin-1 characters are valid identifier, for example:

    >>> '\x94'.encode('latin1')
    b'\x94'
    >>> '\x94'.isidentifier()
    False

There is a workaround, you can convert `bytes` to `str` with "latin-1" decoder 
before processing, IIRC there will be no extra overhead (memory/speed) during 
processing, then the name and content are the same type. :)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40980>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to