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


Groups > comp.lang.python > #26420

RE: attribute is accessed from Nonetype

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ramit.prasad@jpmorgan.com>
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; 'completeness': 0.07; 'python': 0.09; 'received:155': 0.09; 'typeerror:': 0.09; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'one)': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:159.53.110': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; '>>>': 0.18; 'to:name:python-list@python.org': 0.20; 'object.': 0.22; 'received:169.254': 0.24; 'header:In-Reply-To:1': 0.25; '2.6': 0.27; 'accuracy': 0.27; 'received:169': 0.29; 'to:addr:python- list': 0.33; 'clear': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'correctly': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'information,': 0.63; 'url:email': 0.63; 'legal': 0.65; 'subject': 0.66; 'purchase': 0.67; 'sale': 0.76; '(yes,': 0.84; 'received:169.254.8': 0.84
X-DKIM OpenDKIM Filter v2.1.3 sj1.jpmchase.com q7371xa8029219
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpmorgan.com; s=smtpout; t=1343977319; bh=id35kf3e7uvNunSMQIAY0k4KDmN/uAttyfMEUxn57oQ=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=qJdnhaEBVQLJEwFAUCymx5ZAMH00aBKmdMx9hmrGDfdqc3e1WG7Y/wtBmxuMA3vvw pRi7Ic7Pn2bQhwrcJjxz2TTWBouvi5wndqRLIQWJiWHB+vYIVkFct6qdk6cTSLU4H6 J+dGbSMyN8xi3ZajIz1JGrJdw36l5f9HXFG14OZs=
From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: attribute is accessed from Nonetype
Thread-Topic attribute is accessed from Nonetype
Thread-Index AQHNcJmTLnyQsShMwEGZaf5Ul+40Y5dGnvaAgAEK9cA=
Date Fri, 3 Aug 2012 07:01:29 +0000
References <CAMLC9n6ES9CwCE_OqEsnvQJ1gG_2MJEmrkjzQaM7tPQ4-4k0nA@mail.gmail.com> <501A5EAF.9090501@davea.name>
In-Reply-To <501A5EAF.9090501@davea.name>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.67.79.47]
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-DLP-FWD Yes
Content-Type text/plain; charset="us-ascii"
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.2893.1343977330.4697.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343977330 news.xs4all.nl 6894 [2001:888:2000:d::a6]:44484
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26420

Show key headers only | View raw


> Also, please use the names correctly and consistently.  The None object
> (yes, there is only one) is not the same as a none object.  And there is
> no standard type called Nonetype.

To be fair, this is not very clear to a beginner. 

>>> len(None) # Python 2.6
TypeError: object of type 'NoneType' has no len()


Ramit
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

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


Thread

RE: attribute is accessed from Nonetype "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-08-03 07:01 +0000

csiph-web