attribute is accessed from Nonetype

Dave Angel d at davea.name
Fri Aug 3 18:20:33 EDT 2012


On 08/03/2012 03:01 AM, Prasad, Ramit wrote:
>> 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()
>

I'm sorry, what's not clear?  Nonetype is not the same as NoneType. 
Python is case sensitive.


-- 

DaveA




More information about the Python-list mailing list