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


Groups > comp.lang.python > #58929

Re: my favorite line of py code so far

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.035
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; '"this': 0.03; 'subject:code': 0.07; 'underscore': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'stefan': 0.19; 'examples': 0.20; 'header:In-Reply-To:1': 0.27; 'skip:( 40': 0.30; 'message-id:@mail.gmail.com': 0.30; 'though.': 0.31; 'class': 0.32; "we're": 0.32; 'quite': 0.32; 'but': 0.35; 'received:google.com': 0.35; 'two': 0.37; 'nov': 0.38; 'others.': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'different': 0.65; 'talking': 0.65; 'distinguish': 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 :content-type; bh=zhGtkiJ2QOVMtlAGO26F9zkG+N7Djx04WS9aSS8i1wc=; b=0zvCX1JiHCBFY6aZmyxy+Yrw3jtJANPI1YS0JK3sH3CSLii5UCwy5B6qgXdIiwYZZy rrj1E8aNako1tZB24oZXo0hXDapGkxUFkTvFnVUtsObvY54MifjwZk9Nt1gdl0iqhTSE TCLjA4hGTXY9VHI5hVBvDPq5tWnDgZftJ6O4mBfWI51IM03jjsde0kkzDsTT2rphm+u8 vkZCdsl+GkvaWQtn/D+pWfDTBWYk5W0kEJ9Hr4xJPJHHGuA70FWstv8prDggZbri96oK fe3zwzGPArkUpVGjvv1cmdKuoOPHs4Vl+Dt3B7PBFYOTqR7eIYXdMQB3gu08eNIpkjQu li6w==
MIME-Version 1.0
X-Received by 10.68.224.38 with SMTP id qz6mr937385pbc.156.1384001145534; Sat, 09 Nov 2013 04:45:45 -0800 (PST)
In-Reply-To <l5lah1$nru$1@ger.gmane.org>
References <fbbabb45-f0e3-4e7f-968f-9822607c450a@googlegroups.com> <729e093a-6312-44dc-8ed4-1dd5ea344066@googlegroups.com> <l5l7fi$qi1$1@ger.gmane.org> <l5lah1$nru$1@ger.gmane.org>
Date Sat, 9 Nov 2013 23:45:45 +1100
Subject Re: my favorite line of py code so far
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.2290.1384001149.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1384001149 news.xs4all.nl 16001 [2001:888:2000:d::a6]:59834
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:58929

Show key headers only | View raw


On Sat, Nov 9, 2013 at 11:41 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
> 2) "this is a non-public thing", as in
>
>     class Xyz:
>         _private = 1

Your three meanings all have the etymology of "ignore me", but I would
distinguish this one from the others. An underscore used on its own
has meaning; an underscore as part of a larger token has quite
different meaning, and can have any of several - "private-ish" (as
above), "mangle me" (double leading, no trailing), "magic" (dunder -
double leading/double trailing), and "word separator"
(between_multiple_words_in_an_identifier). Your other two examples are
what we're talking about here, though.

ChrisA

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


Thread

my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-08 14:22 -0800
  Re: my favorite line of py code so far Chris Angelico <rosuav@gmail.com> - 2013-11-09 09:32 +1100
  Re: my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-08 14:43 -0800
  Re: my favorite line of py code so far Peter Otten <__peter__@web.de> - 2013-11-09 08:12 +0100
  Re: my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-09 01:23 -0800
    Re: my favorite line of py code so far Chris Angelico <rosuav@gmail.com> - 2013-11-09 20:28 +1100
    Re: my favorite line of py code so far Paul Rubin <no.email@nospam.invalid> - 2013-11-09 01:49 -0800
    Re: my favorite line of py code so far Peter Otten <__peter__@web.de> - 2013-11-09 12:49 +0100
    Re: my favorite line of py code so far Stefan Behnel <stefan_ml@behnel.de> - 2013-11-09 13:41 +0100
    Re: my favorite line of py code so far Chris Angelico <rosuav@gmail.com> - 2013-11-09 23:45 +1100
    Re: my favorite line of py code so far Peter Otten <__peter__@web.de> - 2013-11-09 14:49 +0100
  Re: my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-10 00:57 -0800
    Re: my favorite line of py code so far Chris Angelico <rosuav@gmail.com> - 2013-11-10 21:23 +1100
  Re: my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-10 00:59 -0800
  Re: my favorite line of py code so far Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-10 16:00 -0800

csiph-web