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
It would be useful to have a contract for a function that require such an instance.
To keep python duck-typing semantic, we can check the instance members (just like we do for dict), but checking one by one :
It would be helpful to check custom types.
For example if an instance of a class is defined as such :
It would be useful to have a contract for a function that require such an instance.
To keep python duck-typing semantic, we can check the instance members (just like we do for dict), but checking one by one :
This way any object that has an int
class_member
and an intinst_member
will satisfy the contract.I am posting this issue because I haven't found any way to do this currently...
The text was updated successfully, but these errors were encountered: