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


Groups > comp.lang.python > #7462

Re: Recursion error in metaclass

References <4df2e251$0$30002$c3e8da3$5496439d@news.astraweb.com> <mailman.124.1307770420.11593.python-list@python.org> <4df353b4$0$30002$c3e8da3$5496439d@news.astraweb.com> <it0g9m$pjj$1@dough.gmane.org>
From Daniel Urban <urban.dani@gmail.com>
Date 2011-06-11 22:51 +0200
Subject Re: Recursion error in metaclass
Newsgroups comp.lang.python
Message-ID <mailman.139.1307825483.11593.python-list@python.org> (permalink)

Show all headers | View raw


On Sat, Jun 11, 2011 at 21:39, Terry Reedy <tjreedy@udel.edu> wrote:
> What may not be obvious from the docs is that the metaclass calculation
> described in the doc section on class statements is carried out within
> type.__new__ (or after a possible patch, called from within that), so that
> type calls are really "a dynamic form of the class statement" even when
> another another metaclass is specified or implied. "Return a new type
> object." includes instances of type subclasses. I am not sure what happens
> with metaclasses that are not type subclasses. There is at least one bug
> report about the metaclass calculation, which is why I happen to have read
> the typeobject.__new__ code. But I have not read the build-class code and
> all the details of class creation. So I may have some of the details above
> wrong.

Just for the record, I think this is the mentioned bug:
http://bugs.python.org/issue1294232


Daniel

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


Thread

Recursion error in metaclass Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-11 03:34 +0000
  Re: Recursion error in metaclass Terry Reedy <tjreedy@udel.edu> - 2011-06-11 01:33 -0400
    Re: Recursion error in metaclass Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-11 11:38 +0000
      Re: Recursion error in metaclass Terry Reedy <tjreedy@udel.edu> - 2011-06-11 15:39 -0400
      Re: Recursion error in metaclass Daniel Urban <urban.dani@gmail.com> - 2011-06-11 22:51 +0200

csiph-web