bytes vs. characters
bytes vs. characters
Posted Apr 25, 2015 8:19 UTC (Sat) by peter-b (guest, #66996)In reply to: bytes vs. characters by marcH
Parent article: Report from the Python Language Summit
> So the core issue seems to be: the filename being the only file handle. Lose the name and you lose the file. I agree it shouldn't be like this. For instance you can have an iterator that returns some opaque FileObject that does not really care about the name. Does Python have this?
Yes. listdir(x) where x is bytes returns the raw filenames as bytes.
https://docs.python.org/3.4/library/os.html?highlight=lis...
