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 of the path object being > restricted to path algebra operations, though, since the > result depends on the cwd of the process.
What do we do with Path.cwd() then? It also violates the path-algrebra-only logic. How else will people get the current directory? We can put it on FSPath, but then it's the only FSPath method that returns a Path, so you'd be passing FSPath to Path to FSPath. > >>Perhaps. There was one guy in the discussion about Noam's path module > >>who didn't like .expand() at all; he thought it did too many things > >>implicitly and was thus too magical. > > And again, it strays outside the domain of path algebra > operations. This is also the same issue. Where do we put the .expand*() methods if not on Path? Is there an actual case where calling normpath() would change which file the path referred to? Any case that's not handled by (posix|nt|mac)path.normpath itself? -- Mike Orr <[EMAIL PROTECTED]> _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
