Michael Cuthbert added the comment: Here's a rather obscure bug that I was able to catch before we put this into action: doctests inside the __doc__ for namedtuples (and perhaps all namedtuples?) are instances of property, have .fget, but do not have .fget.__code__. Thus one more check is needed:
if (lineno is None and isinstance(obj, property) and obj.fget is not None and hasattr(obj.fget, '__code__')): obj = obj.fget.__code__ lineno = getattr(obj, 'co_firstlineno', None) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17446> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com