I need to return a collection of various types, since python doesn't have the terse facility of extension methods like C#, subclassing tuple and adding a method seems like a terse way to accommodate this.
However, if the method returns one element of the collection, how can one enable introspection for users of IDE's that the resulting reference is of type A, and therefor has A's fields? For example: col = (Class(..), Class(...)) item = col[0] Introspection will now enumerate item as an instance of Class, providing its fields. The subclass of tuple breaks this. Is there a better way to do this? Thanks, jlc -- https://mail.python.org/mailman/listinfo/python-list