Method returning new instance of class?

Paul Rubin http
Sat Sep 4 13:52:48 CEST 2004


"Arthur" <ajsiegel at optonline.com> writes:
> The way I am currently conceptualizing a solution, what I need is a method
> of the class that returns a new instance of the class.

    class foo:
      def bar(self):
         return foo()

What's the problem?



More information about the Python-list mailing list