[issue29696] Use namedtuple in string.Formatter.parse iterator response

2019-05-26 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2019-05-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: It looks like Pablo's patch for this was good, but then closed because the idea was rejected. Should this ticket also be closed as rejected? -- nosy: +cheryl.sabella ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: With the exception of string.FormatterItem, which is the change at hand. -- ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: IMHO this change makes things a bit more consistent. In lots of places when a tuple is returned, a `structseq` is used to improve readability on the returned result. Some examples of this are: * grp.struct_group * os.terminal_size

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-17 Thread Eric V. Smith
Eric V. Smith added the comment: It does seem like overkill for something that's rarely used. I'm -0 on the structseq version. -- ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not convinced that a named tuple is needed here. -- ___ Python tracker ___

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-12 Thread Pablo
Change by Pablo : -- keywords: +patch pull_requests: +3956 stage: -> patch review ___ Python tracker ___

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would also rather see string.py left light weight. It would be better to change the upstream C code to use structseq. -- ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: collections is a moderately heavy module with many dependencies. string is a light module, it imports only _string. I'm -1 for using namedtuple in the string module. -- nosy: +serhiy.storchaka ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-03 Thread Eric V. Smith
Changes by Eric V. Smith : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: It's in string.py, so it would be easy just to add a namedtuple there: class Formatter: ... def parse(self, format_string): return _string.formatter_parser(format_string) I don't see a need to add a structseq to _string, since it's a private API.

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this is all C coded, so it would entail making a new structseq object. -- nosy: +rhettinger ___ Python tracker

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-03-02 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith title: Use namedtuple in Formatter.parse iterator response -> Use namedtuple in string.Formatter.parse iterator response ___ Python tracker