You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core of the dispatch logic is both simple and fast, but checking generic types is neither. It would be nice to offload type checking to a package like beartype, particularly if it becomes a standard. But there are some obstacles.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The core of the dispatch logic is both simple and fast, but checking generic types is neither. It would be nice to offload type checking to a package like beartype, particularly if it becomes a standard. But there are some obstacles.
set
andfrozenset
containers beartype/beartype#167beartype.door.TypeHint
ignores (co|contra|in)variance concerns beartype/beartype#190is_subhint
(issubclass
) andis_bearable
(isinstance
) are slower than in the existingsubtype
implementationBeta Was this translation helpful? Give feedback.
All reactions