En Mon, 21 May 2007 09:26:19 -0300, Unknown <[EMAIL PROTECTED]>  
escribió:

> One example that comes to mind is a class that is a proxy for a database
> class, say Person.
> The Person.Load(id) method doesn't use any instance or class data, it
> instantiates a Person and populates it from the database.
> It is clearly a part of the class's interface so for that I use a
> @staticmethod.

This is called a "factory method" and is usually implemented as a  
classmethod but a staticmethod is often OK.

> *That* Pythonic I'm already ;-)

Good!

-- 
Gabriel Genellina

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

Reply via email to