Serhiy Storchaka added the comment:

> 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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19146>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to