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