[Python-ideas] PEP 428 - object-oriented filesystem paths

Yuval Greenfield ubershmekel at gmail.com
Sat Oct 6 15:49:49 CEST 2012


On Sat, Oct 6, 2012 at 3:42 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Sat, 06 Oct 2012 15:08:27 +0200
> Georg Brandl <g.brandl at gmx.net> wrote:
> > >
> > > Well, "basename" is the name proposed for the "part before the
> > > extension". "name" is the full filename.
> > >
> > > (so path.name == path.basename + path.ext)
> >
> > Is it?  You said yourself it was easily confused with
> os.path.basename()'s result.
>
> True, but since we already have the name attribute it stands reasonable
> for basename to mean something else than name :-)
> Do you have another suggestion?
>
>
It appears "base name" or "base" is the convention for the part before the
extension.

http://en.wikipedia.org/wiki/Filename

Perhaps os.path.basename should be deprecated in favor of a better named
function one day. But that's probably for a different thread.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121006/7253e07a/attachment.html>


More information about the Python-ideas mailing list