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


Groups > comp.lang.python > #25510

Re: Style question: metaclass self vs cls?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.149
X-Spam-Level *
X-Spam-Evidence '*H*': 0.71; '*S*': 0.01; 'subject:question': 0.08; '__new__': 0.16; 'wrote:': 0.17; 'received:mail- bk0-f46.google.com': 0.22; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'received:209.85.214.46': 0.27; 'message- id:@mail.gmail.com': 0.27; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'method': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'jul': 0.65; 'amount.': 0.84; 'subject:self': 0.84; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=YE5RqFK2BcCgJjVYbTjSw2eLbWMmsZT8iXgl8gLaJeM=; b=KxCSDDfJfjWKtVq+G2PuXKIEXiOUGD4e4pS9rpG63DGMW/AUcvWofg3OlOCZyfKjrP X7w8Aio2v+RGIHr3iZm1R3qvyQhiyo/sS4roHwrNyMR3bnnyQjXG9wXNbeEYWPI/d7gQ y0OW9wXDwAeUrVqvIQc5Kspj7wyETNpZJcoKEoVmeDfcK/2/kkY5Zc278lmwbWVib8qY x+cjB49Ow0EaoiTJvI2mjtPuTj8tADbOxUJ+u7MzaTk9jpSCothFsskVkmrt89avcKIb 2Ei142E22h6Uu4L3kVObQqjjigxatwIN7Mz4GJfNfV6Y6Teu4sUh8igeVUtF6vUmWnMY x+AQ==
MIME-Version 1.0
In-Reply-To <7566b8bc-929e-4f70-8e44-f0bda232ef85@googlegroups.com>
References <50043377$0$29978$c3e8da3$5496439d@news.astraweb.com> <7566b8bc-929e-4f70-8e44-f0bda232ef85@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 17 Jul 2012 10:34:04 -0600
Subject Re: Style question: metaclass self vs cls?
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2226.1342542877.4697.python-list@python.org> (permalink)
Lines 5
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1342542881 news.xs4all.nl 6890 [2001:888:2000:d::a6]:52594
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:25510

Show key headers only | View raw


On Tue, Jul 17, 2012 at 6:23 AM, Michele Simionato
<michele.simionato@gmail.com> wrote:
> The standard is to use `cls`. In the __new__ method you can use `mcl` or `meta`.

I've also seen `mcs` a fair amount.

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


Thread

Style question: metaclass self vs cls? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-16 15:29 +0000
  Re: Style question: metaclass self vs cls? Terry Reedy <tjreedy@udel.edu> - 2012-07-16 18:21 -0400
  Re: Style question: metaclass self vs cls? alex23 <wuwei23@gmail.com> - 2012-07-16 23:10 -0700
    Re: Style question: metaclass self vs cls? Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-17 10:35 -0600
  Re: Style question: metaclass self vs cls? Michele Simionato <michele.simionato@gmail.com> - 2012-07-17 05:23 -0700
    Re: Style question: metaclass self vs cls? Ian Kelly <ian.g.kelly@gmail.com> - 2012-07-17 10:34 -0600
    Re: Style question: metaclass self vs cls? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-18 02:50 +0000

csiph-web