scoping problems

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Fri Jul 27 23:15:19 CEST 2001


27 Jul 2001 14:30:57 -0500, Narayan Desai <desai at mcs.anl.gov> pisze:

> class baseclass():
>       def __init__(self):
>           self.__myfunc__()
> 
> class a(baseclass):
>       __myfunc__=b
> 
> class b(baseclass):
>       __myfunc__=a
> 
> Does anyone know how to get this to work?

class a(baseclass):
    pass

class b(baseclass):
    pass

a.__myfunc__ = b
b.__myfunc__ = a

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list