[issue4285] Use a named tuple for sys.version_info

2009-02-05 Thread Eric Smith
Eric Smith added the comment: Committed in r69331 (trunk) and r69346 (py3k). -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

[issue4285] Use a named tuple for sys.version_info

2009-02-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Eric Smith added the comment: > "... as a named tuple" works for me. I'll go with that. Thanks! +1 Remember, "named tuple" is a concept, not a class. It is anything that provides attribute access as an alternative to indexed access (see the definition

[issue4285] Use a named tuple for sys.version_info

2009-02-04 Thread Christian Heimes
Christian Heimes added the comment: Technically it's not a named tuple. Calling it named tuple may cause confusing. http://docs.python.org/library/os.html#os.stat calls it a structure. ___ Python tracker ___

[issue4285] Use a named tuple for sys.version_info

2009-02-04 Thread Eric Smith
Eric Smith added the comment: "... as a named tuple" works for me. I'll go with that. Thanks! ___ Python tracker ___ ___ Python-bugs-list maili

[issue4285] Use a named tuple for sys.version_info

2009-02-04 Thread Brett Cannon
Brett Cannon added the comment: On Wed, Feb 4, 2009 at 05:56, Eric Smith wrote: > > Eric Smith added the comment: > > The doc string for sys includes: > version_info -- version information as a tuple > > I'm not sure changing this to "... as a structseq" makes it any more > useful, but it's mo

[issue4285] Use a named tuple for sys.version_info

2009-02-04 Thread Eric Smith
Eric Smith added the comment: The doc string for sys includes: version_info -- version information as a tuple I'm not sure changing this to "... as a structseq" makes it any more useful, but it's more correct. Does anyone have a preference? I'd use the same wording as float_info, but that's mis

[issue4285] Use a named tuple for sys.version_info

2009-02-03 Thread Eric Smith
Changes by Eric Smith : -- assignee: brett.cannon -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4285] Use a named tuple for sys.version_info

2009-02-03 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4285] Use a named tuple for sys.version_info

2009-01-26 Thread Ross Light
Ross Light added the comment: Tests added and new patch uploaded. Anything else, anyone? Added file: http://bugs.python.org/file12870/patch-4285d.diff ___ Python tracker ___ ___

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: Rather than deleting the isinstance() check from the tests completely, I suggest changing it to be: self.assert_(isinstance(vi[:], tuple)) Also, comparing directly with a tuple is also a fairly common use of version_info so it would be worth adding a test to exp

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Okay, here's a patch with the requested changes. You're right in saying that flag is usually boolean, I was just going along with several other files where there's float and int flags (i.e. floatobject.c). Added file: http://bugs.python.org/file12860/patch-4285c.d

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Martin v. Löwis added the comment: A couple of further comments: - please use tabs for indentation consistently. - please change Doc/library/sys.rst, including adding a versionchanged indication - I find the naming of the macros *Flag confusing; to me, a "flag" says "boolean" - but I'm not a nat

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Martin v. Löwis
Changes by Martin v. Löwis : Removed file: http://bugs.python.org/file12854/patch-4285a.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 on this idea -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Oh yes, you're right. Sorry! Added file: http://bugs.python.org/file12857/patch-4285b.diff ___ Python tracker ___ _

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: You also need to add unit tests for the new behavior you've implemented. -- nosy: +exarkun ___ Python tracker ___ _

[issue4285] Use a named tuple for sys.version_info

2009-01-25 Thread Ross Light
Ross Light added the comment: Hello, my name is Ross Light. I've written a patch for this, but this is my first patch, so someone please review. This does pass all regression tests, but I did have to modify the test_sys case to not check for sys.version_info being a tuple. -- keywords

[issue4285] Use a named tuple for sys.version_info

2008-11-09 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: I concur that bootstrapping may be a problem. Using a NamedTuple also increases the number of loaded modules by 4 (_collections.so, keyword.py and operator.so). But we could reimplement it with a PyStructSequence like I did for sys.float_in

[issue4285] Use a named tuple for sys.version_info

2008-11-08 Thread Brett Cannon
New submission from Brett Cannon <[EMAIL PROTECTED]>: sys.version_info is just asking for a named tuple consisting of major, minor, micro, releaselevel, and serial. This is assuming, of course, that bootstrapping doesn't get in the way. -- assignee: brett.cannon components: Extension Mo