I'd rather see the following personally:
class REThread(threading.Thread):
'''Enhanced threading.Thread which can deliver a return value and propagate
exceptions from the called thread to the calling thread.'''
def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, verbose=None): '''Initialize Thread, identical to threading.Thread.__init__().'''
#Note that due to api differences in python (verbose disappeared
#at some point before 3.3 and got replaced by daemon), we just
#ignore the verbose attribute. It's not used anywhere in checkbox
#so this is safe for our purposes. self.__target = target
self.__args = args self.__kwargs = kwargs self._retval = None self._exception = None
I'd rather see the following personally: threading. Thread) :
class REThread(
'''Enhanced threading.Thread which can deliver a return value and propagate
exceptions from the called thread to the calling thread.'''
def __init__(self, group=None, target=None, name=None, args=(), kwargs={},
verbose= None):
'''Initialize Thread, identical to threading. Thread. __init_ _().'''
self._ _target = target
self._ _kwargs = kwargs
self._ retval = None
self._ exception = None
#Note that due to api differences in python (verbose disappeared
#at some point before 3.3 and got replaced by daemon), we just
#ignore the verbose attribute. It's not used anywhere in checkbox
#so this is safe for our purposes.
self.__args = args
Let me know if you think this won't work