Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73056
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.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.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; "'',": 0.07; 'none,': 0.07; 'none)': 0.09; 'subject:None': 0.09; 'subject:string': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'none.': 0.16; 'wrote:': 0.18; 'first.': 0.19; 'examples': 0.20; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'usually': 0.31; '>>>>': 0.31; 'constant': 0.31; 'classes': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'ian': 0.60; 'first': 0.61; 'day!': 0.85; 'to:none': 0.92 |
| 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:cc :content-type; bh=HvApHHO17+cNhR4nKwRdIXb++cZCOMO5WpzZA7FRdBw=; b=nE+W+X1zq+Xz8QAKezIWvFf7k4TkbLLFtB4lrHtf1p/QY4FifXOi/W2DVJIG1teF1E QBOEP63d6U+V8AYaPtLwiIIS02GMRprUpmrMKnNbfMqysQ0wwkqG9G6LJ8VZnH1C/eTH EgW9z1qCedzj84dZcvKJzMbLE02IWemP9dzNQNegPornEIjE0aq6H7H8sR5YUSPXJ1tv P1ueASD4X86u+JuhfCiIgIehAJ1T2WwBlfNIWWlo4TZExgihI+8WdXNE/nKaKUfILRsf b/WNMUnRR0AFmp/RN0VXRTjEJbl5aalqZoEt7AjhlAwYxJVXPxbL4wMwKfXSq0rgM7Xx aUCQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.58.220.230 with SMTP id pz6mr7132855vec.9.1402336972003; Mon, 09 Jun 2014 11:02:52 -0700 (PDT) |
| In-Reply-To | <CALwzidmKkF41vFczq9V+KCgceF6++A06YdvGx4LvtbNYcxNugg@mail.gmail.com> |
| References | <048960da-c132-407f-b1b3-4612a3dd7697@googlegroups.com> <20140609185728.3cac55ab@x34f> <03B8D21C-62B4-4344-AA25-FF82501C33D0@panix.com> <CAPTjJmqt+2doOdr-UJTMsDu1f1ZnKD+WEp5SY_LGekR3-FsuOg@mail.gmail.com> <CALwzidkRYToie4f385AwyDq0mG2TEqSz0J8si=R0H0ZMFs4vMg@mail.gmail.com> <CAPTjJmqidANye+3QoyHEr14-04nLXU-dLss0Y7X5eW6OJtChmA@mail.gmail.com> <CALwzidmKkF41vFczq9V+KCgceF6++A06YdvGx4LvtbNYcxNugg@mail.gmail.com> |
| Date | Tue, 10 Jun 2014 04:02:51 +1000 |
| Subject | Re: None in string => TypeError? |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | Python <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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.10933.1402336975.18130.python-list@python.org> (permalink) |
| Lines | 18 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1402336975 news.xs4all.nl 2965 [2001:888:2000:d::a6]:33126 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:73056 |
Show key headers only | View raw
On Tue, Jun 10, 2014 at 3:58 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Mon, Jun 9, 2014 at 11:40 AM, Chris Angelico <rosuav@gmail.com> wrote:
>> Also, this is the first time I've seen None as a constant other than
>> the first. Usually co_consts[0] is None, but this time co_consts[4] is
>> None.
>
> Functions always seem to have None as the first constant, but modules
> and classes are other examples that don't.
>
>>>> co = compile("class MyClass: pass", '', 'exec')
>>>> co.co_consts
> (<code object MyClass at 0x7f32aa0a3c00, file "", line 1>, 'MyClass', None)
>>>> co.co_consts[0].co_consts
> ('MyClass', None)
Huh. Learn something every day!
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
None in string => TypeError? Roy Smith <roy@panix.com> - 2014-06-09 08:34 -0700
Re: None in string => TypeError? Ryan Hiebert <ryan@ryanhiebert.com> - 2014-06-09 10:42 -0500
Re: None in string => TypeError? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-09 09:50 -0600
Re: None in string => TypeError? Paul Sokolovsky <pmiscml@gmail.com> - 2014-06-09 18:57 +0300
Re: None in string => TypeError? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-09 16:14 +0000
Re: None in string => TypeError? Chris Angelico <rosuav@gmail.com> - 2014-06-10 02:31 +1000
Re: None in string => TypeError? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-06-09 16:07 +0000
Re: None in string => TypeError? MRAB <python@mrabarnett.plus.com> - 2014-06-09 17:06 +0100
Re: None in string => TypeError? Shiyao Ma <i@introo.me> - 2014-06-10 00:13 +0800
Re: None in string => TypeError? Roy Smith <roy@panix.com> - 2014-06-09 12:53 -0400
Re: None in string => TypeError? Chris Angelico <rosuav@gmail.com> - 2014-06-10 02:59 +1000
Re: None in string => TypeError? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-09 11:22 -0600
Re: None in string => TypeError? Chris Angelico <rosuav@gmail.com> - 2014-06-10 03:40 +1000
Re: None in string => TypeError? Ian Kelly <ian.g.kelly@gmail.com> - 2014-06-09 11:58 -0600
Re: None in string => TypeError? Chris Angelico <rosuav@gmail.com> - 2014-06-10 04:02 +1000
csiph-web