On Thu, 16 Jun 2011 09:03:58 +0200, Laurent Claessens wrote: >> So, I suppose I shall have to let go of my dreams of >> >> --> Path('/some/path/and/file') == '\\some\\path\\and\\file' >> >> and settle for >> >> --> Path('...') == Path('...') >> >> but I don't have to like it. :( > > > Why not define the hash method to first convert to '/some/path/and/file' > and then hash ?
It's not so simple. If Path is intended to be platform independent, then these two paths could represent the same location: 'a/b/c:d/e' # on Linux or OS X 'a:b:c/d:e' # on classic Mac pre OS X and be impossible on Windows. So what's the canonical path it should be converted to? -- Steven -- http://mail.python.org/mailman/listinfo/python-list