Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'enabling': 0.05; 'python:': 0.09; 'term,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'distinct': 0.16; 'ought': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'code.': 0.18; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'but': 0.35; 'received:google.com': 0.35; 'example,': 0.37; 'resource': 0.38; 'does': 0.39; 'avoid.': 0.84; 'subject:skip:o 10': 0.84; 'washington': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=nqo8lpluPuAxRPXwOcijamu1exjrGh0AMa4ExP2rK44=; b=KzaYNcP7DymDzIzukpcbXVl3pTJNdnecwberoq2xTnKRioawsjiwilO7AahxtRAqXw qFCQLb50XfzwU6AvH1ZmBwzW33TG/HgBU59VInI/68Typ2FEgpxXQQGFsvQqd5lVcrJr R/gMjaM50soiSFzjGde3/ZIWM3fkuqP/cOuc62XEmeivg9ryUM+hkLl9Vv7ac/W7iR2t O4IYiSQfy/Jx01YLxqRkYkG8BTdbZFrsDjZFSzHo+fQiz0FVIgFH7b7OWUnmfAAFo6wy HUiCm8s8LS8yZuzM7RckSe3vWCPixWA0Co4EzCpry9NFbZHRSglMxnJansSRsccN+NIS zYRw== MIME-Version: 1.0 X-Received: by 10.194.19.104 with SMTP id d8mr14722100wje.24.1368068016494; Wed, 08 May 2013 19:53:36 -0700 (PDT) In-Reply-To: <518a123c$0$11094$c3e8da3@news.astraweb.com> References: <518a123c$0$11094$c3e8da3@news.astraweb.com> Date: Wed, 8 May 2013 19:53:36 -0700 Subject: Re: object.enable() anti-pattern From: Mark Janssen To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368068018 news.xs4all.nl 15925 [2001:888:2000:d::a6]:33084 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44994 > 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