[Python-Dev] Further PEP 8 compliance issues in threading and multiprocessing

Fredrik Lundh fredrik at pythonware.com
Mon Sep 1 18:28:19 CEST 2008


Antoine Pitrou wrote:

> event_class = Event().__class__ ?
> 
> Not pretty I know :-)

somewhat prettier, assuming 2.3 or newer:

 >>> import threading
 >>> e = threading.Event()
 >>> type(e)
<class 'threading._Event'>
 >>> isinstance(e, type(threading.Event()))
True

(but pretty OT)

</F>



More information about the Python-Dev mailing list