New submission from Skip Montanaro <s...@pobox.com>: The main thread has an ident, but the threading module doesn't recognize that fact. I shouldn't have to "start" the main thread.
Example: % python Python 2.7a0 (trunk:70084, Feb 28 2009, 20:51:51) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import threading >>> import thread >>> print threading.currentThread(), threading.currentThread().ident, thread.get_ident() <_MainThread(MainThread, started)> None -1602627808 % python3.1 Python 3.1a0 (py3k:70084M, Feb 28 2009, 20:46:48) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import threading >>> print (threading.current_thread(), threading.current_thread().ident)<_MainThread(MainThread, started)> None ---------- components: Library (Lib) messages: 84901 nosy: skip.montanaro severity: normal status: open title: Bug - threading.currentThread().ident returns None in main thread type: behavior versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5632> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com