[Q] Type checking...

Thomas Wouters thomas at xs4all.nl
Mon Jul 19 08:29:10 EDT 1999


On Mon, Jul 19, 1999 at 02:20:24PM +0200, Thomas Wouters wrote:
> |>>> b=ClassB()
> |>>> a=ClassA

> |>>> b.mymethod(a)
> |Yes :)

Erp, this is a cut-and-paste error (my xterms obviously doesn't talk python
yet.) While 'a=ClassA' is valid, the 'b.mymethod(a)' would have yielded 'No
:(', not 'Yes :)', because ClassA is not an instance of ClassA. It IS
ClassA.

Anyway, i meant to say

> |>>> a=ClassA()

The rest of the example was copied right.

(c)-ly yours,

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list