dynamic
James Carroll
mrmaple at gmail.com
Thu Jun 16 10:05:28 EDT 2005
Oh, I see. Yeah, having the code look like you're instantiating one
class, but really getting a different one is really horrible. Sorry I
didn't catch on to the subtlety. I'm always complaining about code
that looks like it does one thing, but really does another.
-Jim
On 15 Jun 2005 22:24:28 -0700, Michele Simionato
<michele.simionato at gmail.com> wrote:
> I think using __new__ when a plain old factory method would
> work is horrible. But I am not saying that there no use cases for
> __new__. I used it once, when I wanted a class working
> for the final user as a factory function. I just wrote the class in
> lower case and gave it a custom __new__ method.
>
> Michele Simionato
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
More information about the Python-list
mailing list