Timeline for answer to C-like structures in Python by gz
Current License: CC BY-SA 3.0
Post Revisions
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 26, 2021 at 12:06 | review | Suggested edits | |||
| Jul 27, 2021 at 6:13 | |||||
| Dec 11, 2018 at 14:18 | comment | added | intellimath | There is an mutable variant of namedtuple - recordclass (bitbucket.org/intellimath/recordclass/src/default/README.md) | |
| Oct 14, 2017 at 11:10 | comment | added | ArtOfWarfare | @Kapil - The second argument to namedtuple should be a list of the names of members. That list can be any length. | |
| Oct 14, 2017 at 2:24 | comment | added | Rotareti | @ArtOfWarfare knows it. | |
| Jul 31, 2017 at 22:47 | comment | added | Rotareti | @Kapil For which version of Python does that apply? | |
| Jul 19, 2017 at 10:52 | comment | added | PapaDiHatti | namedtuple can have atmost four arguments so how we can map structure with more data members with corresponding namedtuple | |
| Apr 26, 2017 at 19:34 | history | edited | gz. | CC BY-SA 3.0 |
PEP8 the last added usage example
|
| Jan 13, 2015 at 18:57 | comment | added | Michael Smith | Nice solution. How would you loop through an array of these tuples? I would assume that fields 1-3 would have to have the same names across tuple objects. | |
| Aug 12, 2014 at 11:42 | history | edited | ArtOfWarfare | CC BY-SA 3.0 |
This was added to the standard library nearly 6 years ago - that should be mentioned from the get-go, not as a footnote at the bottom.
|
| Aug 12, 2014 at 11:29 | comment | added | ArtOfWarfare | @mhowison - In my case, that's just a plus. | |
| Jan 30, 2013 at 7:54 | history | edited | dan-gph | CC BY-SA 3.0 |
Added example.
|
| Jan 17, 2013 at 17:46 | comment | added | mhowison | ...but namedtuple is immutable. The example in the OP is mutable. | |
| Jan 3, 2012 at 15:37 | history | edited | Harriv | CC BY-SA 3.0 |
added link to documentation
|
| Sep 12, 2008 at 19:48 | history | edited | gz. | CC BY-SA 2.5 |
Also in the up-coming Python 2.6
|
| Aug 30, 2008 at 15:18 | history | answered | gz. | CC BY-SA 2.5 |