Dev] / as path join operator (was: Re: The path module PEP) (original) (raw)
BJörn Lindqvist bjourne at gmail.com
Thu Jan 26 19:45:09 CET 2006
- Previous message: [Python-Dev] / as path join operator (was: Re: The path module PEP)
- Next message: [Python-Dev] / as path join operator (was: Re: The path module PEP)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think that everything that can be said aboud div() has already been said. But this argument was really convincing:
[Tony Meyer]
The vast majority of people (at least at the time) were either +0 or -0, not +1. +0's are not justification for including something.
There is no clear consensus either way. Ultimately, Guido will decide if he thinks it is clever or not. Meanwhile I'll remove it from the PEP and keep it as an "optional extension." Also, like Jason said, the removal of div() leads to the ultimate demise of joinpath(), woho!
[Jason Orendorff]
in which case I propose using the Path constructor as the replacement for os.path.join(). In that case, Path.joinpath can be dropped.
Path.cwd() / "foobar"
==>
Path(Path.cwd(), "foobar")
Path("foo") / "bar" / "baz"
==>
Path("foo", "bar", "baz")
Still, in the simpler cases, div() looks really handy:
os.chdir(pkgdir / "include")
==>
os.chdir(Path(pkgdir, "include"))
Oh well. You can't have everything, can you? The updated PEP and an implementation is availible from http://wiki.python.org/moin/PathClass.
-- mvh Björn
- Previous message: [Python-Dev] / as path join operator (was: Re: The path module PEP)
- Next message: [Python-Dev] / as path join operator (was: Re: The path module PEP)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]