Message215342
Trying to construct a Path object from a str subclass, e.g.
class S(str): pass
Path(S("foo"))
fails because the subclass cannot be interned. I think that the interning should simply be removed for non-exactly-str arguments (it is only here for performance reasons, right?), or at least the error should be more explicit (note, in particular, that there is no error if one tries 'Path(S("foo/bar"))' instead, which only confuses the matter more).
In practice, I found out this via numpy, which provides its own str subclass, numpy.str_. |
|
Date |
User |
Action |
Args |
2014-04-01 22:08:28 | Antony.Lee | set | recipients:
+ Antony.Lee |
2014-04-01 22:08:28 | Antony.Lee | set | messageid: <1396390108.81.0.285327356985.issue21127@psf.upfronthosting.co.za> |
2014-04-01 22:08:28 | Antony.Lee | link | issue21127 messages |
2014-04-01 22:08:28 | Antony.Lee | create | |
|