[Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue

Victor Stinner victor.stinner at haypocalc.com
Mon Sep 29 18:00:18 CEST 2008


Le Monday 29 September 2008 17:16:47 Steven Bethard, vous avez écrit :
> >  - getcwd() -> unicode
> >  - getcwd(bytes=True) -> bytes
>
> Please let's not introduce boolean flags like this. How about
> ``getcwdb`` in parallel with the old ``getcwdu``?

Yeah, you're right. So i wrote a new patch: os_getcwdb.patch

With my patch we get (Python3):
 * os.getcwd() -> unicode
 * os.getcwdb() -> bytes

Previously in Python2 it was:
 * os.getcwd() -> str (bytes)
 * os.getcwdu() -> unicode

-- 
Victor Stinner aka haypo
http://www.haypocalc.com/blog/


More information about the Python-Dev mailing list