Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #110034

Re: Bulk Adding Methods Pythonically

From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: Bulk Adding Methods Pythonically
Date 2016-06-16 12:15 -0400
Message-ID <mailman.94.1466093711.2288.python-list@python.org> (permalink)
References <njs3nv$b19$1@dont-email.me> <5761A678.8010003@stoneleaf.us> <1466093708.1546731.639770593.4D6E2982@webmail.messagingengine.com>

Show all headers | View raw


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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bulk Adding Methods Pythonically Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-15 17:37 +0000
  Re: Bulk Adding Methods Pythonically Random832 <random832@fastmail.com> - 2016-06-15 14:21 -0400
    Re: Bulk Adding Methods Pythonically Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-15 18:39 +0000
      Re: Bulk Adding Methods Pythonically Steven D'Aprano <steve@pearwood.info> - 2016-06-16 11:38 +1000
        Re: Bulk Adding Methods Pythonically Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-06-21 17:04 +0000
  Re: Bulk Adding Methods Pythonically Ethan Furman <ethan@stoneleaf.us> - 2016-06-15 12:03 -0700
    Re: Bulk Adding Methods Pythonically lists@juliensalort.org (Julien Salort) - 2016-06-16 17:53 +0200
      Re: Bulk Adding Methods Pythonically Steven D'Aprano <steve@pearwood.info> - 2016-06-17 03:36 +1000
  Re: Bulk Adding Methods Pythonically Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-15 18:59 -0700
  Re: Bulk Adding Methods Pythonically Random832 <random832@fastmail.com> - 2016-06-16 12:15 -0400
  Re: Bulk Adding Methods Pythonically Ethan Furman <ethan@stoneleaf.us> - 2016-06-16 12:58 -0700

csiph-web