object.enable() anti-pattern
Chris Angelico
rosuav at gmail.com
Fri May 10 10:46:56 EDT 2013
On Sat, May 11, 2013 at 12:37 AM, Roy Smith <roy at panix.com> wrote:
> I suppose, if I had a class like this, I would write a factory function
> which called the constructor and post-construction initializer. And
> then I would make the constructor protected.
That sounds like a reasonable plan, with the possible exception of
protected. Since meeting Python, I've stopped using private and
protected anywhere.
ChrisA
More information about the Python-list
mailing list