Message369520
PurePath subclasses cannot support kwargs as __new__() does not accept **kwargs:
>>> from pathlib import PurePath
>>> class MyPurePath(PurePath):
... def __init__(self, *args, **kargs): pass
...
>>> MyPurePath('foo', spam=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __new__() got an unexpected keyword argument 'spam'
The behaviour for this should probably be made the same for both Path and PurePath. |
|
Date |
User |
Action |
Args |
2020-05-21 11:56:21 | remi.lapeyre | set | recipients:
+ remi.lapeyre, brett.cannon, pitrou, serhiy.storchaka, jstasiak, JelleZijlstra, Jim Fasarakis-Hilliard, uriyyo |
2020-05-21 11:56:21 | remi.lapeyre | set | messageid: <1590062181.92.0.250179600427.issue29847@roundup.psfhosted.org> |
2020-05-21 11:56:21 | remi.lapeyre | link | issue29847 messages |
2020-05-21 11:56:21 | remi.lapeyre | create | |
|