where we use types?
almost:
isinstance(obj, T);
# issubclass(S, T);
Note that TYPE is SET;
if we add __contains__ and __le__ into "type",
then things become:
obj in T;
# S <= T; # if only not misleading to a total ordering
example:
def __getitems__(self, i):
if i in Integral:
...
elif i in slice:
...
# Save "(,)". Really, I prefer to type "lambda:;" than "()".
# I fail to modify the "type" object, since it is a C-object.
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/