Message348160
I think using a dataclass here would be easier, since you can control class variables. Is there some reason that your loader must be a namedtuple?
Something like:
from typing import ClassVar
from dataclasses import dataclass
@dataclass
class MyLoader:
__spec__: ClassVar["Any"] = None
name: str
l = MyLoader('test')
I'm not sure of the actual type of __spec__, I'm just using "Any" as a convenient placeholder. I'm also not sure if your intention is to inherit from importlib.abc.Loader, but that's easy enough. |
|
Date |
User |
Action |
Args |
2019-07-19 09:49:37 | eric.smith | set | recipients:
+ eric.smith, brett.cannon, rhettinger, ethan.furman, captain-kark |
2019-07-19 09:49:37 | eric.smith | set | messageid: <1563529777.68.0.372054517083.issue37623@roundup.psfhosted.org> |
2019-07-19 09:49:37 | eric.smith | link | issue37623 messages |
2019-07-19 09:49:37 | eric.smith | create | |
|