[Python-Dev] Revive the types sig?

Thomas Bellman bellman at lysator.liu.se
Sat Mar 17 20:58:48 EST 2001


"Fredrik Lundh" <fredrik at pythonware.com> writes:

> Paul Moore wrote:

>>     def f(n):
>>         assert <n supports the "integer" interface>

> footnote: the correct way to spell this is:

>         assert isinstance(n, type(1)) # or types.IntType

But that doesn't mean the same thing!  There is a difference
between following a certain interface specification, and
inhereting from a common base class.


-- 
Thomas Bellman,   Lysator Computer Club,   Linköping University,  Sweden
"Adde parvum parvo magnus acervus erit"       ! bellman @ lysator.liu.se
          (From The Mythical Man-Month)       ! Make Love -- Nicht Wahr!



More information about the Python-list mailing list