RE: attribute is accessed from Nonetype

Discussion in 'Python' started by Prasad, Ramit, Aug 3, 2012.

  1. > 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.
     
    Prasad, Ramit, Aug 3, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jordan Harry
    Replies:
    1
    Views:
    516
    Sean DiZazzo
    May 2, 2008
  2. Dave Angel
    Replies:
    0
    Views:
    167
    Dave Angel
    Aug 2, 2012
  3. Dave Angel
    Replies:
    0
    Views:
    164
    Dave Angel
    Aug 3, 2012
  4. Chris Angelico

    Re: attribute is accessed from Nonetype

    Chris Angelico, Aug 3, 2012, in forum: Python
    Replies:
    1
    Views:
    153
    Steven D'Aprano
    Aug 4, 2012
  5. Dave Angel
    Replies:
    2
    Views:
    207
    Dave Angel
    Aug 4, 2012
Loading...

Share This Page