mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 20:10:17 +00:00
support generics
This commit is contained in:
parent
2b031e61a2
commit
8ec3bb0b5d
@ -222,7 +222,7 @@ tuple.__ge__ = __f
|
||||
list.__ge__ = __f
|
||||
|
||||
type.__repr__ = lambda self: "<class '" + self.__name__ + "'>"
|
||||
type.__getitem__ = lambda self, T: self # for generics
|
||||
type.__getitem__ = lambda self, *args, **kwargs: self # for generics
|
||||
|
||||
def help(obj):
|
||||
if hasattr(obj, '__func__'):
|
||||
|
@ -23,5 +23,5 @@ TypeVar = _PLACEHOLDER
|
||||
Self = _PLACEHOLDER
|
||||
|
||||
class Generic:
|
||||
def __getitem__(self, T):
|
||||
def __getitem__(self, *args, **kwargs):
|
||||
return object
|
Loading…
x
Reference in New Issue
Block a user