Message198874
> Me neither, but you can't change a function that returns a list of 4-tuples
> into a function that returns a list of 5-tuples without breaking existing
> code. IIRC for struct and time tuples we created a hack in C where we
> return something that behaves like an N-tuple but has some extra attributes
> -- but I don't think collections.namedtuple supports that.
It do.
class tb_entity(namedtuple('tb_entity', 'filename lineno name line')):
def __new__(cls, filename, lineno, name, line, frame=None):
self = super().__new__(cls, filename, lineno, name, line)
self.frame = frame
return self |
|
Date |
User |
Action |
Args |
2013-10-02 21:53:27 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, akuchling, vstinner, benjamin.peterson, Claudiu.Popa |
2013-10-02 21:53:27 | serhiy.storchaka | set | messageid: <1380750807.46.0.339681177518.issue19146@psf.upfronthosting.co.za> |
2013-10-02 21:53:27 | serhiy.storchaka | link | issue19146 messages |
2013-10-02 21:53:27 | serhiy.storchaka | create | |
|