James Y Knight wrote: > On Dec 9, 2008, at 6:04 AM, Anders J. Munch wrote: >> The typical application will just obliviously use os.listdir(dir) and >> get the default elide-and-warn behaviour for un-decodable names. That >> rare special application > > I guess this is a new definition of rare special application: "an > application which deals with user-specified files". > > This is the problem I see in having two parallel APIs: people keep > saying "most applications can just go ahead and use the [broken] unicode > string API". If there was a unicode API and a bytes API, but everyone > was clear that "always use the bytes API" is the right thing to do, > that'd be okay... But, since even python-dev members are saying that > only a rare special app needs to care about working with users' existing > files, I'm rather worried this API design will cause most programs > written in python to be broken. Which seems a shame. > I agree with you which was part of why I raised this subject but I also think that using the warnings module to issue a warning and ignore the entire problematic entry is a reasonable compromise. Hopefully it will become obvious to people that it's a python3 wart at some point in the future and we'll re-examine the default. But until then, having a printed warning that individual apps can turn into an exception seems like it is less broken than the other alternatives the "rare special application" people can live with :-)
-Toshio
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com