Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2b.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.046 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'trailing': 0.07; 'global,': 0.09; ':-)': 0.14; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.16; 'thoughts': 0.18; '>>>': 0.20; 'filtering': 0.22; 'module': 0.23; 'header:In-Reply-To:1': 0.24; 'paul': 0.24; 'header:User- Agent:1': 0.26; 'points': 0.27; 'separate': 0.27; 'bad.': 0.29; 'function': 0.30; 'entry': 0.31; 'especially': 0.32; 'received:84': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'subject:?': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'too': 0.36; 'subject:: ': 0.37; 'instead': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'subject:the': 0.40; 'easy': 0.60; 'more': 0.62; 'hate': 0.66; 'horrible': 0.84; 'miss.': 0.84; 'ethan': 0.91; 'furman': 0.91; 'subject:Set': 0.91; 'remember,': 0.93 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=OoyysHLt c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=QrohdLjRRo4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=kZ7UWmmPAAAA:8 a=3eDn8uy50iMf7gn9wnkA:9 a=QEXdDO2ut3YA:10 X-AUTH: mrabarnett@:2500 Date: Tue, 16 Jun 2015 02:15:50 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Set a flag on the function or a global? References: <557f6676$0$21718$c3e8da3@news.astraweb.com> <87381strn6.fsf@jester.gateway.sonic.net> <557F736D.4000701@stoneleaf.us> In-Reply-To: <557F736D.4000701@stoneleaf.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434417354 news.xs4all.nl 2821 [2001:888:2000:d::a6]:48663 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92655 On 2015-06-16 01:53, Ethan Furman wrote: > On 06/15/2015 05:37 PM, Paul Rubin wrote: >> Steven D'Aprano writes: >>> Thoughts and feedback? Please vote: a module global, or a flag on the >>> object? Please give reasons, and remember that the function is intended >>> for interactive use. >> >> Both are bad. More state to remember, ugh. Instead have separate entry >> points for filtering or not filtering the dunders. Something like: >> >> edir(obj) = no dunders >> edir_(obj) = dunders. > > `edir_` ? What a horrible name. I hate trailing underscores. Too easy to miss. > Especially when there's also `edir`! :-)