[Python-Dev] [Python-checkins] cpython: Issue #11223: Add threading._info() function providing informations about the (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Thu Apr 21 00:14:43 CEST 2011


On Wed, 20 Apr 2011 17:03:19 -0500 Benjamin Peterson <benjamin at python.org> wrote:

2011/4/20 Victor Stinner <victor.stinner at haypocalc.com>: > Le mercredi 20 avril 2011 à 11:57 -0500, Benjamin Peterson a écrit : >> How about using a structseq ala sys.floatinfo or sys.longinfo? (In >> fact, we might want to put this in sys.) > > Would you prefer something like the following example? > >>>> sys.threadinfo > sys.threadinfo(name='pthread', 'lockimplementation': 'semaphore', > version: 'NPTL 2.11.2') >>>> sys.threadinfo > sys.threadinfo(name='nt', 'lockimplementation': 'semaphore', version: > '') >>>> sys.threadinfo > sys.threadinfo(name='os2', 'lockimplementation': '', version: '')

The only things that would improve that beautiful sight would be s/threadinfo/threadinfo/. :)

And None instead of the empty string when a value is unknown/irrelevant.

Regards

Antoine.



More information about the Python-Dev mailing list