On Tue, Mar 15, 2011 at 11:15, Nick Coghlan <ncogh...@gmail.com> wrote: > The challenge here is how it would interact with inheritance. pydoc > couldn't use normal attribute lookup, it would have to walk the MRO > manually, only applying __api__ to the specific class that defined it.
Great catch. I know pydoc already looks at this in the attrs-processing loop (to group attrs by their defining class), but my current implementation applies __api__ too early to deal with that. I'll fix it. Any test cases should definitely throw some diamond-pattern or even more degenerate cases at the implementation. What *is* the worst case for MRO complexity? Overall, this is becoming more interesting than I'd thought at first. Is this something that should require a PEP? -- Tim Lesher <tles...@gmail.com> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com