Re: [Python-3000] Mini Path object

2006-11-07 Thread Talin
Mike Orr wrote: > My latest idea is something like this: > > BEGIN > class Path(unicode): > """Pathname-manipulation methods.""" > pathlib = os.path # Subclass can specify (posix|nt|mac)path. > safe_args_only = False# Glyph can set this to True in a subclass. > I

Re: [Python-3000] Mini Path object

2006-11-07 Thread Mike Orr
On 11/7/06, Talin <[EMAIL PROTECTED]> wrote: > Mike Orr wrote: > > My latest idea is something like this: > > > > BEGIN > > class Path(unicode): > > """Pathname-manipulation methods.""" > > pathlib = os.path # Subclass can specify > > (posix|nt|mac)path. > > safe_args

Re: [Python-3000] Mini Path object

2006-11-07 Thread Mike Orr
How do you convert an absolute path anyway? PosixPath(NTPath("C:\winnt\system")) => ?? NTPath(PosixPath("/mnt/cdrom") => ?? You can convert them to "/winnt/system" and "\mnt\cdrom", but what's the point? They won't exist anyway. -- Mike Orr <[EMAIL PROTECTED]>

Re: [Python-3000] Mini Path object

2006-11-07 Thread Greg Ewing
Talin wrote: > I'm a little confused here about the model of how platform-specific and > application-specific formats are represented. Is it the case that the > creation function converts the platform-specific path into a generic, > universal path object, or does it create a platform-specific p

Re: [Python-3000] Mini Path object

2006-11-07 Thread Mike Orr
On 11/7/06, Greg Ewing <[EMAIL PROTECTED]> wrote: > .abspath() > >>> > >>>I've always thought this was a strange function. To be honest, I'd > >>>rather explicitly pass in the cwd(). > >> > >>I use it; it's convenient. The method name could be improved. > > It does violate the constraint o