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


Groups > comp.lang.python > #56453

Re: class-private names and the Zen of Python

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <oscar.j.benjamin@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'argument': 0.05; 'subject:Python': 0.06; 'attribute': 0.07; 'level,': 0.07; 'parser': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; 'assignments': 0.16; 'at.': 0.16; 'marco': 0.16; 'metaclass': 0.16; 'sees': 0.16; 'subject:class': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '&gt;': 0.26; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'getting': 0.31; 'occurs': 0.31; 'class': 0.32; 'another': 0.32; 'skip:d 20': 0.34; 'subject:the': 0.34; 'anywhere': 0.35; 'but': 0.35; 'received:google.com': 0.35; '+0200,': 0.36; 'level': 0.37; 'pm,': 0.38; 'sure': 0.39; 'full': 0.61; 'within': 0.65; 'body.': 0.68; 'answer:': 0.84; 'oscar': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xFzY7ZgDbWU921hHpPudTFAHzJxJCQ41jHNIDIIZp9w=; b=ClwFocHeG7r19lqfj2jW8Nq9zIB8TMtORuKaDHGJCAzpYlcQE1YFYdPq5AI8hIy1uD bmY6YPiH36lItzAfd0/Tsx+dmI9hzUOj94AifdWgYkkC0q8+vSUYFTtHvVNOo7ii8MuB nNpWO9iUdiYIs5aRN8AlnGvSUoQUIEUVZ4Jcjp9qRlem4F+iYDy+MLw2PTJEq0Efjlaj 1SjfkergZ/Yxuza4uBQOo0gOgnRaPeTvTldirrFQBoSC6m4RmlyOdWZeFiXZQPQA870u gQ9HkpoYVgNstiBh51hyYRViDyf3OO1AwhS9+igE4rNqjQ8Dkw4lBnrB1sCtN/XfXt0/ AoYw==
MIME-Version 1.0
X-Received by 10.52.173.165 with SMTP id bl5mr2538548vdc.18.1381273214884; Tue, 08 Oct 2013 16:00:14 -0700 (PDT)
In-Reply-To <52540779$0$29984$c3e8da3$5496439d@news.astraweb.com>
References <l30lsq$tfd$1@speranza.aioe.org> <52540779$0$29984$c3e8da3$5496439d@news.astraweb.com>
Date Wed, 9 Oct 2013 00:00:14 +0100
Subject Re: class-private names and the Zen of Python
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
To "Steven D'Aprano" <steve+comp.lang.python@pearwood.info>
Content-Type multipart/alternative; boundary=bcaec51b9cfd4fa26c04e842bbf1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.880.1381273223.18130.python-list@python.org> (permalink)
Lines 48
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381273223 news.xs4all.nl 15959 [2001:888:2000:d::a6]:35263
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56453

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Oct 8, 2013 2:26 PM, "Steven D&apos;Aprano" <
steve+comp.lang.python@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

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


Thread

class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 12:13 +0200
  Re: class-private names and the Zen of Python Terry Reedy <tjreedy@udel.edu> - 2013-10-08 06:36 -0400
    Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 12:47 +0200
  Re: class-private names and the Zen of Python Ned Batchelder <ned@nedbatchelder.com> - 2013-10-08 07:07 -0400
    Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-08 13:15 +0200
      Re: class-private names and the Zen of Python Ned Batchelder <ned@nedbatchelder.com> - 2013-10-08 12:20 -0400
  Re: class-private names and the Zen of Python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-08 13:24 +0000
    Re: class-private names and the Zen of Python Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-09 00:00 +0100
      Re: class-private names and the Zen of Python Marco Buttu <marco.buttu@gmail.com> - 2013-10-09 07:55 +0200
    Re: class-private names and the Zen of Python Charles Hixson <charleshixsn@earthlink.net> - 2013-10-09 12:34 -0700

csiph-web