object.enable() anti-pattern

Mark Janssen dreamingforward at gmail.com
Wed May 8 22:53:36 EDT 2013


> I'm looking for some help in finding a term, it's not Python-specific but
> does apply to some Python code.
>
> This is an anti-pattern to avoid. The idea is that creating a resource
> ought to be the same as "turning it on", or enabling it, or similar. For
> example, we don't do this in Python:

I would call it "user-mediated resource allocation" as distinct from
"object-mediated" resource allocation.
-- 
MarkJ
Tacoma, Washington



More information about the Python-list mailing list