Closed thautwarm closed 2 years ago
NOTE: those builtin classes will implement corresponding __init_subclass__.
__init_subclass__
Lookup
__getitem__, __setitem__
class Lookup[K, T]: @abstractmethod def __setitem__(self, index: K, value: T): ... @abstractmethod def lookup(self, index: K, valueref: ref[T]): ... #this is not abstract! def __getitem__(self, index: K) -> T: ...
Order
__lt__,__gt__, ...
class Eq[V]: @abstractmethod def __eq__(self, other: V) -> bool: ... # not abstract def __ne__(self, other: V) -> bool: ... class Order[V]: @abstractmethod def __lt__(self, other: V) -> bool: ... # not abstract def __gt__(...) def __ge__(...)
it seems like __getitem__ which is injected by PolyIC, this proposal will use a subclass to fast these magic methods ?
__getitem__
PolyIC
@lfkdsk __getitem__ is not using IC.
NOTE: those builtin classes will implement corresponding
__init_subclass__
.Lookup
, for__getitem__, __setitem__
Order
for__lt__,__gt__, ...