TYPE is not a collection!
But  conceptually it is a SET,  set of all its possible instances.

quot:
    "Types and Programming Languages (2002)(Benjamin C. Pierce)"
    [page 92] Chapter 8 Typed Arithmetic Expressions
    "a term t has type T" (or "t belongs to T," or "t is an element of T")
An object obj has a type T or obj is a type T <==> obj belongs to T
    So, "obj in T" is fine.
    e.g.
        "1 in int" means 1 is in the whole number set.




> > Note that TYPE is SET;
> What does that mean? I don't understand.

> > obj in T;
> But obj is **not** in T, since T is a type, not a container.

> "is-a" tests are not the same as "in" tests. They are completely 
> unrelated comparisons.



_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to