[Python] Python logging
Lawrence Oluyede
l.oluyede a gmail.com
Lun 3 Dic 2007 12:24:23 CET
>
> Tempo fa Michele Simionato aveva postato (non su questa mailing list)
> questo script:
>
> import logging
> import threading
>
> class C(object):
> def __init__(self):
> print threading.currentThread()
>
> def __del__(self):
> print threading.currentThread()
> logging.warn('deleted %r' % self)
>
> if __name__ == '__main__':
> c = C()
>
>
>
> > $python logbug.py
> > <_MainThread(MainThread, started)>
> > <_DummyThread(Dummy-1, started daemon)>
> > Exception exceptions.AttributeError: "'NoneType' object has no attribute 'warn'" in <bound method C.__del__ of <__main__.C object at 0xb7da310c>> ignored
Direi che in questo caso e` un non problema pero`... __del__ e` come la peste ;)
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
More information about the Python
mailing list