Open
Description
When trying to instantiate a simple Generic class, it returns None. Removing the (Generic[T]) part returns the proper instance.
from typing import Generic, TypeVar
T = TypeVar('T')
class TestClass(Generic[T]):
_attr: T
def __init__(self, attr: T):
self._attr = attr
test = TestClass(34)
print(test) # None
I'm using micropython 3.4.0; MicroPython v1.25.0-preview.365.g3823aeb0f.dirty on 2025-03-10.
Don't know how to get typing version, but should definitely be more than 1.24.0
Metadata
Metadata
Assignees
Labels
No labels