Filip GruszczyĆski wrote: > I have done some testing and it seems, that it might not be Python > problem. Well, when I use only pure Python objects, I get really nice > description of the object (which means the type). But I am using PyQt > and it seems, that when an object is subclassing QObject (or possibly > some other class from qt, that can be not derived from QObject) it can > only display information about the name of the function. PyQt are > python bindings for C++ qt library. Can this be the reason for not > displaying type of the object? Yeah, any time someone implements their own attribute lookup process for a class (be it via __getattr__, __getattribute__ or the C equivalents), it is up to the reimplementation to appropriately format their error message if they raise AttributeError directly. This could possibly be made easier to do correctly via a specific AttributeError class method (also exposed through the C API) that accepted a type object and an attribute name and then produced a nicely formatted error message the way the builtin types do. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia ---------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4