[Python-3000] Path Reform: Get the ball rolling
Oleg Broytmann
phd at phd.pp.ru
Wed Nov 1 15:10:11 CET 2006
On Wed, Nov 01, 2006 at 08:03:55AM -0600, Michael Urman wrote:
> > p = os.path.normpath( os.path.join( __file__, "../..", "lib" ) )
>
> Shouldn't an example avoid using the path separator directly within a
> string literal?
>
> p = path.normpath(path.join(__file__, "..", "..", "lib"))
It also should use platform-independent constants:
p = path.normpath(path.join(__file__, os.pardir, os.pardir, "lib"))
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-3000
mailing list