newbe questions

Diez B. Roggisch deets_noospaam at
Sat Nov 1 18:24:16 CET 2003


> class base:
>  def __init__(self):
>   print "base"
>   self.y_ = self.base_inner()
>  def show(self):
>   print self.x_.value_
>   print self.y_.value_
>   print self.z_
>  class base_inner:
>   def __init_(self):

your __init__ method lacks a second underscore. BTW: Why do you use inner
classes at all? The make sense in e.g. java, because they can overcome some
limitations in java itself. The only thing I ever used them in c++ was to
create a sort of namespace, which is also not neccessary because of
modules. What are your reasons for using them?



More information about the Python-list mailing list