A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-October/082747.html below:

[Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue

[Python-Dev] [Python-3000] New proposition for Python3 bytes filename issue [Python-Dev] [Python-3000] New proposition for Python3 bytes filename issueBill Janssen janssen at parc.com
Wed Oct 1 19:14:00 CEST 2008
glyph at divmod.com wrote:

> > I'm actually sort of liking this idea.  A Pathname class, for
> > convenience
> > a subtype of String, but containing the underlying binary
> > representation
> >used by the OS.  Even non-unicode pathnames could be represented.
> 
> On the one hand, I agree with you - except for the part where it's a
> subtype of String, that doesn't work.  In case I haven't mentioned it
> enough times already:
> 
> http://twistedmatrix.com/documents/8.1.0/api/twisted.python.filepath.FilePath.html
> 
> On the other hand, we've all been on this merry-go-round before:
> 
>    http://www.python.org/dev/peps/pep-0355/
> 
> Note especially the rejection notice: "Subclassing from str is a
> particularly bad idea".

Yes, the only real justification for it is to not break existing code
(otherwise, calling str() is not that much of an ordeal).

> On the other hand, we've all been on this merry-go-round before:
> 
>    http://www.python.org/dev/peps/pep-0355/

The very existence of os.path seems a good argument that something like
this is useful.  Perhaps PEP 355 just went too far.

Bill
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4