Message52279
The revised patch looks good. I think the comment about it being O(n**2) is not to be worrisome. I suppose you could argue for something like:
return list(set([os.path.normpath(p) for p in paths]))
However, you would lose the ordering, which must be maintained. At worst, the path can only be 4096 characters (at most 1024 entries of "C:\\"). Except in the face of what will be an error (the final path is going to be too large), we are bounded from above at n=2048, which is plenty fast.
I think you probably guess that much, but at least my rationale for such a simple algorithm is recorded. |
|
Date |
User |
Action |
Args |
2007-08-23 15:57:42 | admin | link | issue1685563 messages |
2007-08-23 15:57:42 | admin | create | |
|