Method returning new instance of class?

Paul Rubin http
Sat Sep 4 07:52:48 EDT 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