Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.060 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'trailing': 0.07; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'global,': 0.09; 'message- id:@stoneleaf.us': 0.09; 'wrote:': 0.16; 'thoughts': 0.18; '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; '~ethan~': 0.29; 'function': 0.30; 'entry': 0.31; "d'aprano": 0.33; 'steven': 0.33; 'subject:?': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'too': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'instead': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'subject:the': 0.40; 'easy': 0.60; 'more': 0.62; 'charset:windows-1252': 0.65; 'hate': 0.66; 'horrible': 0.84; 'miss.': 0.84; 'received:10.1.10': 0.84; 'subject:Set': 0.91; 'remember,': 0.93 Date: Mon, 15 Jun 2015 17:53:01 -0700 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.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> In-Reply-To: <87381strn6.fsf@jester.gateway.sonic.net> Content-Type: text/plain; charset=windows-1252; 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434415991 news.xs4all.nl 2923 [2001:888:2000:d::a6]:45742 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92654 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. -- ~Ethan~