Replies: 1 comment
-
I'm not an expert on runtime type implementation details, so I don't know the answer to your question. You may find that the Python typing forum is a good place to post such questions. That forum is frequented by many members of the Python typing community, and their knowledge spans many areas. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I hope this message finds you well. I am seeking assistance with an issue related to a custom Python type I have developed, called MyDict, which is implemented in C++. This custom type does not inherit from Python's native dict.
I would like to enable support for generic typing with this custom type, allowing usage such as
class AAA(MyDict[str, str])
. However, when I attempt this, I encounter the following runtime error:TypeError: type 'MyDict' is not subscriptable
.Could you please provide guidance on how to resolve this issue? Your expertise would be greatly appreciated.
Thank you for your assistance.
Beta Was this translation helpful? Give feedback.
All reactions