On Wed, 20 Apr 2011 17:03:19 -0500 Benjamin Peterson <benja...@python.org> wrote:
> 2011/4/20 Victor Stinner <victor.stin...@haypocalc.com>: > > Le mercredi 20 avril 2011 à 11:57 -0500, Benjamin Peterson a écrit : > >> How about using a structseq ala sys.float_info or sys.long_info? (In > >> fact, we might want to put this in sys.) > > > > Would you prefer something like the following example? > > > >>>> sys.thread_info > > sys.threadinfo(name='pthread', 'lock_implementation': 'semaphore', > > version: 'NPTL 2.11.2') > >>>> sys.thread_info > > sys.threadinfo(name='nt', 'lock_implementation': 'semaphore', version: > > '') > >>>> sys.thread_info > > sys.threadinfo(name='os2', 'lock_implementation': '', version: '') > > The only things that would improve that beautiful sight would be > s/threadinfo/thread_info/. :) And None instead of the empty string when a value is unknown/irrelevant. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com