[issue26961] Provide an API to help debug super().__getattribute__ results

2016-05-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26961] Provide an API to help debug super().__getattribute__ results

2016-05-05 Thread Doug Hellmann
Doug Hellmann added the comment: @Nick - Being able to get to the source is ok, but if I can get the actual type I can always get the source from that. I don't need the actual type object except to know what it is, and it seems more flexible to return the class object than a name or other refe

[issue26961] Provide an API to help debug super().__getattribute__ results

2016-05-05 Thread Doug Hellmann
Doug Hellmann added the comment: The specific case I have right now is with a large code base written by someone else who is seeing a TypeError when they call super(their-local-class, self).__init__() because whatever class super() is returning is expecting arguments to __init__(). The TypeErr

[issue26961] Provide an API to help debug super().__getattribute__ results

2016-05-04 Thread Nick Coghlan
Nick Coghlan added the comment: Actually, since this is intended primarily for debugging: Doug, do you actually need the type information? Or would combining inspect.getsourcefile() and inspect.getlines() with super().__init__ to locate the source code for the offending method implementation b

[issue26961] Provide an API to help debug super().__getattribute__ results

2016-05-04 Thread Nick Coghlan
Nick Coghlan added the comment: The main reason for suggesting operator is that it needs to be in an extension module if it's going to share the underlying lookup algorithm used by super().__getattribute__ rather than reimplementing it. I'm not particularly concerned about the exact API name t