[Python-Dev] Path PEP: some comments (equality) (original) (raw)
Mark Mc Mahon mark.m.mcmahon at gmail.com
Mon Feb 20 17:06:45 CET 2006
- Previous message: [Python-Dev] (-1)**(1/2)==1?
- Next message: [Python-Dev] Path PEP: some comments (equality)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
It seems that the Path module as currently defined leaves equality testing up to the underlying string comparison. My guess is that this is fine for Unix (maybe not even) but it is a bit lacking for Windows.
Should the path class implement an eq method that might do some of the following things:
- Get the absolute path of both self and the other path
- normcase both
- now see if they are equal
This would make working with paths much easier for keys of a dictionary on windows. (I frequently use a case insensitive string class for paths if I need them to be keys of a dict.)
My first email to python-dev :-) Mark
- Previous message: [Python-Dev] (-1)**(1/2)==1?
- Next message: [Python-Dev] Path PEP: some comments (equality)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]