Jesus Cea <jcea <at> jcea.es> writes:
> 
> First we had "thread.setDaemon()". This was not PEP8, so Python 3.0
> renamed it to "thread.set_daemon()". Lately Python 3.0 changes the
> method to an attribute "thread.daemon".
> 
> I think the last change is risky, because you can mistype and create a
> new attribute, instead of set daemon mode. Since daemon mode is only
> usually visible when things goes wrong (the main thread dies), you can
> miss the bug for a long time.

I've never understood why the "daemon" flag couldn't be passed as one of the
constructor arguments. It would make code shorter, and avoid the mistyping risk
mentioned by Jesus. It also sounds saner, since you shouldn't change the flag
after the thread is started anyway.

Regards

Antoine.


_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to