class-private names and the Zen of Python

Oscar Benjamin oscar.j.benjamin at gmail.com
Tue Oct 8 19:00:14 EDT 2013


On Oct 8, 2013 2:26 PM, "Steven D'Aprano" <
steve+comp.lang.python at pearwood.info> wrote:
>
> On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
>
> > Another question is: where is the place in which this transformation
> > occurs? Is it at the parser level, before the dictionary attribute is
> > gave as argument to the metaclass?
>
> Good question!
>
> I don't have a full answer, but I have a part answer: it occurs before
> the metaclass sees the namespace:
>

I thought it was at the parser level and applied to assignments at class
level and attribute assignments anywhere within a class body.

I'm pretty sure there's no way to control the behaviour from Python code if
that's what the metaclass question is getting at.

Oscar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20131009/ba42c9aa/attachment.html>


More information about the Python-list mailing list