Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Bulk Adding Methods Pythonically Date: Thu, 16 Jun 2016 12:15:08 -0400 Lines: 16 Message-ID: References: <5761A678.8010003@stoneleaf.us> <1466093708.1546731.639770593.4D6E2982@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de GQ+MaAYE1//vsFZW98vC6Qx+Up+FMCyTBXh6PdVM5h2g== 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; 'namespace': 0.09; 'received:internal': 0.09; 'wed,': 0.15; '"current': 0.16; '(more': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:Adding': 0.16; 'text?': 0.16; 'wrote:': 0.16; 'copied': 0.18; 'language': 0.19; 'all,': 0.20; 'somewhere': 0.24; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'updating': 0.27; 'skip:( 20': 0.28; 'dictionary': 0.29; '15,': 0.30; 'mention': 0.30; 'table': 0.32; '[1]': 0.32; 'returned': 0.32; 'class': 0.33; 'url:python': 0.33; 'symbol': 0.33; 'definition': 0.34; 'returning': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'mean': 0.38; 'does': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'url:3': 0.60; 'header:Message-Id:1': 0.61; 'real': 0.62; 'else.': 0.66; 'url:functions': 0.84; 'ethan': 0.91; 'furman': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=ed9w4VRab1VrzlRO2qIzLLzNDP0=; b=fHtk0I 1z+Qr7ny4YlxJbfUuqj5RdUofF0lBkdlB1nDnnng2wbmpbGmnMUn3gTX8Z1lspfh Cs4E+DaoyDU4c4tk6eJWsJFEkvUrNWk0p3hWpqn3yiD6uveo3i0ZczfUfbUdwVw7 RhQpTej+fxn/XFwWaLEb2q1m6ZQYxS2N5bL4A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ed9w4VRab1VrzlR O2qIzLLzNDP0=; b=aGjjaeRTj+wBcPpZ1iIKkdiAP5PZuslDKvnJ1G+Ec4Z2e4U hon0ypS/o/PGjxD8J8KlS6OYIsBjEUAw9DmolZCc/CekFk80q7fvbm+gJFG7Oz6d 1U86UlyJC+/fcAvmm1S9+r3Dq7QdUPvo6cE6Zdio2OCWBs3oez+gRgc4iUsU= X-Sasl-Enc: bb/vUs5hMla75r16RcBocOp87qlyRM+rNTUgVvlOo+Kl 1466093708 X-Mailer: MessagingEngine.com Webmail Interface - ajax-127413e6 In-Reply-To: <5761A678.8010003@stoneleaf.us> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1466093708.1546731.639770593.4D6E2982@webmail.messagingengine.com> X-Mailman-Original-References: <5761A678.8010003@stoneleaf.us> Xref: csiph.com comp.lang.python:110034 On Wed, Jun 15, 2016, at 15:03, Ethan Furman wrote: > [1] https://docs.python.org/3/library/functions.html#locals > Yes, returning the class namespace is a language gaurantee. How do you get a guarantee from that text? I don't see any definition asserting that the "current local symbol table" is the class namespace (more specifically, the object returned by (metaclass).__prepare__, which will be copied into [not used as, for normal types] (class).__dict__). We *know* that "representing the current local symbol table" can and often does mean "copied from the local symbol table which is not a in fact a dictionary" rather than "being the local symbol table which is a real dictionary object" (that's *why*, after all, updating locals() doesn't work in the general case), nor does it mention any exemption to the warning about updating it. If there's a guarantee of this, it's somewhere else.