[Python-Dev] Filename as byte string in python 2.6 or 3.0?
"Martin v. Löwis"
martin at v.loewis.de
Sun Sep 28 23:19:03 CEST 2008
> I can't agree here. File handling is a fundamental operation and I
> would expect something like:
>
>>>> for fname in os.listdir('.'):
> ... if os.path.isfile(fname):
> ... file(fname)
>
> to work for all files.
I agree. However, if it fails: is the bug of the Python, or of the
system administrator maintaining it?
> To have to know to put in special handling for
> certain corner case filenames or worse to not be able to open some
> files at all would be a serious loss. It would also complicate
> migrating code correctly to 3.0.
I agree completely. Unfortunately, all proposed solutions *do* require
special handling for certain corner cases.
> Regardless of whose fault the underlying issue is, someone has to deal
> with the problem and if core Python doesn't, each developer who
> encounters the problem will have to come up with his/her own solution.
This is quite in the abstract. Can you be more specific?
Regards,
Martin
More information about the Python-Dev
mailing list