Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

>  * bytes parent class "class Filename(bytes): ..." -> that's the
> current implementation

I don't think that makes sense (especially under Windows which has Unicode file
APIs). os.listdir() and friends should really return str or str-like objects,
not bytes-like objects with an additional __str__ method.

>  * str parent class "class Filename(str): ..." -> doesn't work because
> os functions uses the fake unicode filename before testing the bytes
> (real) filename

Well, of course, if we create a filename type, then all os functions must be
adapted to accept it rather than assume str.

All this is highly speculative of course, and if we really follow this course
(i.e. create a filename type) it should probably be postponed to 3.1: too many
changes with far-reaching consequences.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3187>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to