New submission from Brian Curtin <cur...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue7766>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to