metal wrote:
> But this style makes code full with ugly  self.__class__
> 
> Any standard/pythonic way out there?

You are already using one standard way to implement an alternative
constructor.

If you don't need any instance attributes you can use another way:

class Egg(object):
    @classmethod
    def spam(cls):
        return cls(...)

Christian

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to