[issue8603] Create a bytes version of os.environ and getenvb()

Marc-Andre Lemburg report at bugs.python.org
Thu Jul 29 09:56:24 CEST 2010


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Ezio Melotti wrote:
> 
> Ezio Melotti <ezio.melotti at gmail.com> added the comment:
> 
> A quick search[0] also shows that environ.data is used by several projects. Changing it from str to bytes will most likely break these programs, so I'm not sure it's a good idea.
> Also, if I understand correctly, on Windows os.environ.data still contains str, so it's inconsistent with other systems.
> IMHO os.environ.data should contain str, whereas os.environb.data bytes. If they must share the same data I would prefer them to be both str.
>
> [0]: http://www.google.com/codesearch?q=lang%3Apython+environ.data&hl=en

Direct use of os.environ.data is not permitted as it is not a documented
feature, so I wouldn't worry about this.

The few uses you found are easy to fix.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8603>
_______________________________________


More information about the Python-bugs-list mailing list