Late initialization using __getattribute__

Carl Banks pavlovevidence at gmail.com
Thu Sep 4 22:16:44 CEST 2008


On Sep 4, 3:38 pm, bukzor <workithar... at gmail.com> wrote:
> The point of using a mixin is to not limit myself to inheriting from
> VanillaCursor. I want to put this on top of various subclasses of the
> vanilla cursor, like TimeLimitedCursor or RetryingCursor. I have four
> other mixins that operate this way, so it's desirable to keep this one
> in line with that.

http://www.bartleby.com/59/3/foolishconsi.html

I think that desire is hurting you more than it's helping.  It's fine
to be consistent for consistency's sake, but you are taking
consistency to an unhealthy extreme.  A mixin is simply the wrong tool
to do this with.

My advice: either use a proxy, or manage your connections better.


Carl Banks



More information about the Python-list mailing list