[issue15193] Exception AttributeError: "'NoneType' object has no attribute

2012-06-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

See also this warning message: 
http://docs.python.org/reference/datamodel.html#object.__del__

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15193] Exception AttributeError: "'NoneType' object has no attribute

2012-06-26 Thread Mark Dickinson

Mark Dickinson  added the comment:

The exception you report looks incomplete:  there should be something after the 
'no attribute' saying which attribute lookup failed.

In any case, I don't thing this is a bug.  It sounds like a result of the 
unpredictability of cleanup order at interpreter shutdown:  you're encountering 
a situation where the 'Person' reference has already been deleted from the 
module namespace before the __del__ method for one of the Person instances gets 
called;  so the 'Person' name lookup in the __del__ method fails.  You could 
get around this by replacing 'Person' with 'type(self)' in __del__.

--
nosy: +mark.dickinson
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15193] Exception AttributeError: "'NoneType' object has no attribute

2012-06-26 Thread Mithilesh Kumar

New submission from Mithilesh Kumar :

Behavior of the program changes with number of charaters used in variable name. 
Attached file shows a simple example.

--
files: objectvar.py
messages: 164073
nosy: prime
priority: normal
severity: normal
status: open
title: Exception AttributeError: "'NoneType' object has no attribute
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file26168/objectvar.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com