No threading.start_new_thread(), useful addition?

Carl Banks pavlovevidence at gmail.com
Sat Oct 10 19:19:57 EDT 2009


On Oct 9, 3:45 pm, Christian Heimes <li... at cheimes.de> wrote:
> Laszlo Nagy wrote:
> > IMHO it is much cleaner to implement this as a decorator. Pro:
> > transparent passing of positional and keyword arguments, keeps function
> > documentation.
>
> You are entitled to your opinion but I STRONGLY recommend against your
> decorator. You MUST NOT start threads a a side effect of a module
> import.

His decorator doesn't do that (necesarily).

His example code did that, but I took it to be an example script, and
it's kind of hard to run code that's not a side effect of importing
__main__.


Carl Banks



More information about the Python-list mailing list