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


Groups > comp.lang.python > #111228

Re: __qualname__ exposed as a local variable: standard?

From eryk sun <eryksun@gmail.com>
Newsgroups comp.lang.python
Subject Re: __qualname__ exposed as a local variable: standard?
Date 2016-07-09 18:52 +0000
Message-ID <mailman.155.1468090401.2295.python-list@python.org> (permalink)
References <379ac9d7-f68e-4e36-bb55-ca8b1887962d@googlegroups.com> <CACL+1asshVxiActQCx22MaVyfZCThuv3Eq_mysDqQsmTich_RQ@mail.gmail.com>

Show all headers | View raw


On Sat, Jul 9, 2016 at 4:08 AM,  <carlosjosepita@gmail.com> wrote:
>
> I noticed __qualname__ is exposed by locals() while defining a class.

This is an undocumented implementation detail used to pass this
information to the metaclass. You'll also see __module__ and, if the
class has a docstring, __doc__. For CPython, this is implemented in
the functions compiler_class (for __module__ and __qualname__) and
compiler_body (for __doc__), which you'll find in Python/compile.c.

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


Thread

__qualname__ exposed as a local variable: standard? carlosjosepita@gmail.com - 2016-07-08 21:08 -0700
  Re: __qualname__ exposed as a local variable: standard? eryk sun <eryksun@gmail.com> - 2016-07-09 18:52 +0000

csiph-web