Python style question
mbp at sourcefrog.net
Mon Jun 6 14:11:08 BST 2005
On 6 Jun 2005, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Martin Pool wrote:
> | One way is a simple function, as here. Another way is a static method
> | like Branch.open(). I suppose one might also override the call method
> | for Branch so that it possibly constructs a subclass(?)
> I've only been using python for a year, but my understanding is that
> class method != static method.
Yes, and very useful they are too. I often wish other languages had
Hm, I don't really understand your mail though... if you did want an
abstract factory then a static method would seem to be the right
way, and I didn't speak of class methods...
> Personally, I prefer using a function, which is what I do in C++, too.
More information about the bazaar