OO conventions

Fredrik Lundh fredrik at pythonware.com
Thu Feb 2 02:24:01 EST 2006


Terry Hancock wrote:

> What Lundh is modeling this on is not standard OOP thinking,
> but rather the standard way of opening files in Python.
>
> Or you could say he's using a "factory function".

"open" is a factory function, and it picks the right class based
on the file you're opening.

anyone arguing that this is bad OOP is deluded.

</F>






More information about the Python-list mailing list