• Just van Rossum's avatar
    Patch #683592 revisited, after discussions with MvL: · 96b1c903
    Just van Rossum yazdı
    - Implement the behavior as specified in PEP 277, meaning os.listdir()
      will only return unicode strings if it is _called_ with a unicode
      argument.
    - And then return only unicode, don't attempt to convert to ASCII.
    - Don't switch on Py_FileSystemDefaultEncoding, but simply use the
      default encoding if Py_FileSystemDefaultEncoding is NULL. This means
      os.listdir() can now raise UnicodeDecodeError if the default encoding
      can't represent the directory entry. (This seems better than silcencing
      the error and fall back to a byte string.)
    - Attempted to decribe the above in Doc/lib/libos.tex.
    - Reworded the Misc/NEWS items to reflect the current situation.
    
    This checkin also fixes bug #696261, which was due to os.listdir() not
    using Py_FileSystemDefaultEncoding, like all file system calls are
    supposed to.
    96b1c903
Adı
Son kayıt (commit)
Son güncelleme
..
api Loading commit data...
dist Loading commit data...
doc Loading commit data...
ext Loading commit data...
html Loading commit data...
info Loading commit data...
inst Loading commit data...
isilo Loading commit data...
lib Loading commit data...
mac Loading commit data...
paper-a4 Loading commit data...
paper-letter Loading commit data...
perl Loading commit data...
ref Loading commit data...
templates Loading commit data...
texinputs Loading commit data...
tools Loading commit data...
tut Loading commit data...
whatsnew Loading commit data...
.cvsignore Loading commit data...
ACKS Loading commit data...
Makefile Loading commit data...
Makefile.deps Loading commit data...
README Loading commit data...
TODO Loading commit data...
python-docs.txt Loading commit data...