Author vstinner
Recipients eric.araujo, eric.smith, ncoghlan, pitrou, r.david.murray, vstinner
Date 2010-09-29.22:48:52
SpamBayes Score 2.98645e-07
Marked as misclassified No
Message-id <>
I don't understand why you would like to implicitly convert bytes to str (which is one of the worse design choice of Python2). If you don't want to care about encodings, use bytes is fine. Decode bytes using an arbitrary encoding is the fastest way to mojibake.

So You have two choices: create new functions with bytes as input and output (like os.getcwd() and os.getcwdb()), or the output type will depend on the input type (solution choosen by os.path). Example of ther later:

>>> os.path.expanduser('~')
>>> os.path.expanduser(b'~')
Date User Action Args
2010-09-29 22:48:55vstinnersetrecipients: + vstinner, ncoghlan, pitrou, eric.smith, eric.araujo, r.david.murray
2010-09-29 22:48:55vstinnersetmessageid: <>
2010-09-29 22:48:53vstinnerlinkissue9873 messages
2010-09-29 22:48:53vstinnercreate