Eric Smith e...@trueblade.com added the comment:
Committed in r69331 (trunk) and r69346 (py3k).
--
resolution: - accepted
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
Eric Smith e...@trueblade.com 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
Brett Cannon br...@python.org added the comment:
On Wed, Feb 4, 2009 at 05:56, Eric Smith rep...@bugs.python.org wrote:
Eric Smith e...@trueblade.com 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
Eric Smith e...@trueblade.com added the comment:
... as a named tuple works for me. I'll go with that. Thanks!
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
Christian Heimes li...@cheimes.de 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 rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Eric Smith e...@trueblade.com 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
Changes by Eric Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
___
Python-bugs-list mailing
Changes by Eric Smith e...@trueblade.com:
--
assignee: brett.cannon - eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
___
Ross Light rlig...@gmail.com added the comment:
Tests added and new patch uploaded. Anything else, anyone?
Added file: http://bugs.python.org/file12870/patch-4285d.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
Ross Light rlig...@gmail.com 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.
Jean-Paul Calderone exar...@divmod.com added the comment:
You also need to add unit tests for the new behavior you've implemented.
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
Ross Light rlig...@gmail.com added the comment:
Oh yes, you're right. Sorry!
Added file: http://bugs.python.org/file12857/patch-4285b.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
+1 on this idea
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
Changes by Martin v. Löwis mar...@v.loewis.de:
Removed file: http://bugs.python.org/file12854/patch-4285a.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4285
___
Martin v. Löwis mar...@v.loewis.de 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 -
Ross Light rlig...@gmail.com 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:
Nick Coghlan ncogh...@gmail.com 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
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
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
19 matches
Mail list logo