homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients HWJ, amaury.forgeotdarc, benjamin.peterson, pitrou, vstinner
Date 2008年08月21日.12:55:42
SpamBayes Score 8.422052e-08
Marked as misclassified No
Message-id <1219323369.48ad65e94f011@imp.free.fr>
In-reply-to <1219316369.16.0.371557599728.issue3187@psf.upfronthosting.co.za>
Content
> * 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.
History
Date User Action Args
2008年08月21日 12:55:43pitrousetrecipients: + pitrou, amaury.forgeotdarc, vstinner, benjamin.peterson, HWJ
2008年08月21日 12:55:42pitroulinkissue3187 messages
2008年08月21日 12:55:42pitroucreate

AltStyle によって変換されたページ (->オリジナル) /