[issue7766] sys.getwindowsversion as PyStructSequence

Brian Curtin report at bugs.python.org
Sat Jan 23 20:57:12 CET 2010


New submission from Brian Curtin <curtin at acm.org>:

I always find myself wishing sys.getwindowsversion() utilized the named tuple concept, so here it is against trunk. sys.version_info was also changed in this manner for 2.7.

Because it is a PyStructSeq/named tuple, it is still accessible like a regular old tuple, but can now be accessed by named attributes.

One thing I don't like is that this is a function, unlike sys.version_info. I think something like sys.windows_version would be better...is there sense in making that an additional API and starting to phase out the getwindowsversion function in py3k?

The patch includes doc and test changes.

----------
components: Library (Lib)
files: winver_as_structseq.diff
keywords: needs review, patch, patch
messages: 98197
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: sys.getwindowsversion as PyStructSequence
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15982/winver_as_structseq.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7766>
_______________________________________


More information about the Python-bugs-list mailing list