views:

506

answers:

3

Python 3.x renamed the low-level module 'thread' to '_thread' -- I don't see why in the documentation. Does anyone know?

+6  A: 

I think the old thread module is deprecated in favour of the higher level threading module.

Greg Hewgill
+6  A: 

It looks like the thread module became obsolete in 3.x in favor of the threading module. See PEP 3108.

scompt.com
+7  A: 

It's been quite a long time since the low-level thread module was informally deprecated, with all users heartily encouraged to use the higher-level threading module instead; now with the ability to introduce backwards incompatibilities in Python 3, we've made that deprecation rather more than just "informal", that's all!-)

Alex Martelli
I really like the one-liner thread.start_new_thread(*) approach though. I think it's the most pythonic way to create a thread. I hate having to type 3 lines of code to do the same thing.
Seun Osewa
What's Pythonic is to have "one, and preferably only one, obvious way" to perform a task. If one-liners are your goal, Perl may be more suitable for you than Python, which never particularly targeted them.
Alex Martelli