Issue1818
Created on 2008-01-13 22:27 by rhettinger, last changed 2008-01-22 20:12 by skip.montanaro.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
ntreader.diff
|
rhettinger,
2008-01-13 22:27
|
Proof-of-concept patch |
|
|
| msg59866 (view) |
Author: Raymond Hettinger (rhettinger) |
Date: 2008-01-13 22:27 |
|
Here's a proof-of-concept patch. If approved, will change from
generator form to match the other readers and will add a test suite.
The idea corresponds to what is currently done by the dict reader but
returns a space and time efficient named tuple instead of a dict. Field
order is preserved and named attribute access is supported.
A writer is not needed because named tuples can be feed into the
existing writer just like regular tuples.
|
| msg61523 (view) |
Author: Raymond Hettinger (rhettinger) |
Date: 2008-01-22 19:25 |
|
Barry, any thoughts on this?
|
| msg61532 (view) |
Author: Skip Montanaro (skip.montanaro) |
Date: 2008-01-22 20:12 |
|
I'd personally be kind of surprised if Barry had any thoughts on this.
Is there any reason this couldn't be pushed down into the C code and
replace the normal tuple output completely? In the absence of any
fieldnames you could just dream some up, like "field001", "field002",
etc.
Skip
|
|
| Date |
User |
Action |
Args |
| 2008-01-22 20:12:41 | skip.montanaro | set | nosy:
+ skip.montanaro messages:
+ msg61532 |
| 2008-01-22 19:25:56 | rhettinger | set | messages:
+ msg61523 |
| 2008-01-13 22:27:14 | rhettinger | create | |
|