Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26460
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'builtin': 0.07; 'operand': 0.07; 'python': 0.09; 'special,': 0.09; 'typeerror:': 0.09; 'cc:addr:python-list': 0.10; 'aug': 0.13; 'sat,': 0.15; "'int'": 0.16; 'namespace.': 0.16; 'unsupported': 0.16; 'string': 0.17; 'wrote:': 0.17; '>>>': 0.18; 'import': 0.21; '"",': 0.22; 'either.': 0.22; 'sorry,': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(most': 0.27; 'am,': 0.27; 'module.': 0.27; 'chris': 0.28; "i'm": 0.29; 'url:python': 0.32; 'file': 0.32; 'traceback': 0.33; 'pm,': 0.35; 'there': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'subject:: ': 0.38; 'object': 0.38; 'url:docs': 0.38; 'received:192': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'places': 0.61; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'type(s)': 0.84; 'angel': 0.93 |
| Date | Fri, 03 Aug 2012 19:03:20 -0400 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
| MIME-Version | 1.0 |
| To | Chris Angelico <rosuav@gmail.com> |
| Subject | Re: attribute is accessed from Nonetype |
| References | <CAMLC9n6ES9CwCE_OqEsnvQJ1gG_2MJEmrkjzQaM7tPQ4-4k0nA@mail.gmail.com> <501A5EAF.9090501@davea.name> <5B80DD153D7D744689F57F4FB69AF4741659DDF5@SCACMX008.exchad.jpmchase.net> <501C4EB1.80003@davea.name> <CAPTjJmqA14Pz8-dDsHyAdH-Kdh8SBdg1VO_k5sN2+KTnO2grZw@mail.gmail.com> |
| In-Reply-To | <CAPTjJmqA14Pz8-dDsHyAdH-Kdh8SBdg1VO_k5sN2+KTnO2grZw@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:lHYV2RNX44a9fOHRhpsoOcRKbN2dmEZUnJO+Y+tI/6+ ecNaVVG6XRP0VOTuCU2vYCk6upjz57ag54oyM4H1fVuNyrn0aj H0Lx4nSGs0rsEtdN4NbYkQ+R0iWGwoZIKGbv4pmXrauJsmSIHG oJ6oelxzIezKaClMK+HjLm2MoypumiafHOuCfuV8IFL5++c239 TEc+ZP85suoPlIq7tZLM1VgjduajS5pITVqbdGM91xwMhqa/m2 IhMieng5P5h6pN5scDLJ6T5Jeecx+3O55yIzW1237IN8cQUImj eS+e7tNH7NWpZE+DIkJENLY0qzSJoX0biMEXWb+c1MeJnjs6A= = |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.2920.1344035030.4697.python-list@python.org> (permalink) |
| Lines | 39 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1344035030 news.xs4all.nl 6880 [2001:888:2000:d::a6]:46671 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:26460 |
Show key headers only | View raw
On 08/03/2012 06:41 PM, Chris Angelico wrote:
> On Sat, Aug 4, 2012 at 8:20 AM, Dave Angel <d@davea.name> wrote:
>> I'm sorry, what's not clear? Nonetype is not the same as NoneType.
>> Python is case sensitive.
> There isn't a NoneType either. I get a NameError.
>
> ChrisA
NoneType isn't in the builtin namespace. It's in the types module.
import types
a = types.Nonetype
It's still special, because None is a singleton. In any case there are
a number of places where the string "NoneType" is produced,
>>> type(None)
<type 'NoneType'>
>>> None + 3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
>>> None[3]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not subscriptable
etc.
and it's in the docs, at least on page:
http://docs.python.org/library/constants.html
--
DaveA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: attribute is accessed from Nonetype Dave Angel <d@davea.name> - 2012-08-03 19:03 -0400
Re: attribute is accessed from Nonetype Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-04 01:35 +0000
Re: attribute is accessed from Nonetype Dave Angel <d@davea.name> - 2012-08-03 21:58 -0400
csiph-web