Issue 36584: cython nametuple TypeError (original) (raw)
Issue36584
Created on 2019-04-10 07:24 by beruhan, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg339828 - (view) | Author: beruhan (beruhan) | Date: 2019-04-10 07:24 |
I have a class that inherits from NamedTuple,I have compile it to pyd file on windows use cython,when I import the class and create a object in another py file,It throws error 'TypeError: __new__() takes 1 positional argument but 4 were given' when I don't compile it to pyd,It can use normally,How to deal with it? | ||
msg339829 - (view) | Author: beruhan (beruhan) | Date: 2019-04-10 07:26 |
the class definitions as follows: from typing import NamedTuple class Info(NamedTuple): service: str damage: str privilege: str info = Info("http", "no", "no") | ||
msg339833 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-04-10 07:38 |
This is a bug tracker of CPython -- the C implementation of Python. For bugs in Cython use different tracker. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:13 | admin | set | github: 80765 |
2019-04-10 07:38:51 | serhiy.storchaka | set | status: open -> closednosy: + serhiy.storchakamessages: + resolution: third partystage: resolved |
2019-04-10 07:26:59 | beruhan | set | messages: + |
2019-04-10 07:24:54 | beruhan | create |