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 gvanrossum
Recipients HWJ, amaury.forgeotdarc, benjamin.peterson, dlitz, gvanrossum, loewis, pitrou, vstinner, zegreek
Date 2008-09-29.02:51:45
SpamBayes Score 3.8857806e-16
Marked as misclassified No
Message-id <1222656708.28.0.407636821386.issue3187@psf.upfronthosting.co.za>
In-reply-to
Content
You can call it a leaky abstraction all you want, but most people think
of filenames as text strings most of the time, and we need to somehow
support this, at least for users who agree .  I agree we also need to
support bytes strings (at least on Unix) in order to support backup
routines, and support for bytes in -> bytes out in os.listdir() is meant
for this.  The open() function should also support a pure bytes filename
(and almost does so -- _fileio does, but io.py doesn't yet). 
os.getcwd() is a weird case and will probably need to be given a flag to
make it return bytes (I don't like that style of API much, but the
alternative is perhaps worse -- os.getcwd_bytes()).

Conclusion: I support patches that make the I/O library work with either
bytes or strings.  (It's OK if the bytes don't actually work on Windows,
where the native type is apparently strings -- though it has a bytes API
too, doesn't it?)
History
Date User Action Args
2008-09-29 02:51:48gvanrossumsetrecipients: + gvanrossum, loewis, amaury.forgeotdarc, pitrou, vstinner, benjamin.peterson, HWJ, dlitz, zegreek
2008-09-29 02:51:48gvanrossumsetmessageid: <1222656708.28.0.407636821386.issue3187@psf.upfronthosting.co.za>
2008-09-29 02:51:47gvanrossumlinkissue3187 messages
2008-09-29 02:51:45gvanrossumcreate