Recursive constructors?

Roy Smith roy at popmail.med.nyu.edu
Fri Jul 30 13:18:28 EDT 1999


Is it legal for a constructor function to call itself recursively?  I.e.:

class foo:
   def __init__(self, x):
      if (whatever):
         self.bar = foo(y)

-- 
Roy Smith <roy at popmail.med.nyu.edu>
New York University School of Medicine





More information about the Python-list mailing list