Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'gui': 0.12; 'systems.': 0.12; 'descriptors,': 0.16; 'kern': 0.16; 'most)': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'example': 0.22; 'header:User-Agent:1': 0.23; 'frameworks': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'robert': 0.30; 'then.': 0.30; 'file': 0.32; 'another': 0.32; 'running': 0.33; 'skip:b 30': 0.33; "i'd": 0.34; 'etc': 0.35; 'curious': 0.36; 'instances': 0.36; 'button': 0.38; '8bit%:86': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'talking': 0.65; 'received:46': 0.66; 'limits,': 0.84; 'subject:skip:o 10': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Serhiy Storchaka Subject: Re: object.enable() anti-pattern Date: Fri, 10 May 2013 18:44:35 +0300 References: <518a123c$0$11094$c3e8da3@news.astraweb.com> <518b32ef$0$11120$c3e8da3@news.astraweb.com> <518be931$0$29997$c3e8da3$5496439d@news.astraweb.com> <518c5bbc$0$29997$c3e8da3$5496439d@news.astraweb.com> <518c7f8e$0$29997$c3e8da3$5496439d@news.astraweb.com> <518cd360$0$29997$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 46.211.125.166 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 In-Reply-To: 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368205876 news.xs4all.nl 15916 [2001:888:2000:d::a6]:49851 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45116 10.05.13 15:19, Robert Kern написав(ла): > I'd be curious to see in-the-wild instances of the anti-pattern that you > are talking about, then. Many (if not most) GUI frameworks use this pattern. button = Button("text") button.setForegroundColor(...) button.setBackgoundColor(...) button.setFont(...) button.setRelief(...) button.setBorder(...) button.setWidth(...) button.setAction(...) button.setMouseListener(...) button.place(...) Another example is running a subprocess in Unix-like systems. fork() open/close file descriptors, set limits, etc exec*()