[Python-3000] Mini Path object
Nick Coghlan
ncoghlan at gmail.com
Wed Nov 8 11:22:43 CET 2006
Nick Coghlan wrote:
> I realise this means normalisation and symbol expansion will be defined only
> on FSPath's.
Scratch the bit about normalisation not being defined on the path algebra
object - as the latter part of the previous email noted, normalisation *is*
path algebra based. It just has the problem that whether or not the normalised
version means the same as the original on a given filesystem depends on
whether or not the original involves backtracking after following a symlink.
It's abspath() and cwd() that don't belong on the abstract Path object - the
former would be a zero argument instance method of FSPath objects, while the
latter would be a class method of FSPath. In both cases, the result would be
an FSPath since it relates specifically to the current filesystem (and is
OS-dependent, as an absolute path on Windows starts with a drive specifier or
UNC name, while one on a *nix system will start at the root directory).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list