You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2019-10-27.15:24:34.311>labels= ['library', '3.9']
title='inspect.getdoc could examine the __class__ cell for dynamically generated subclasses'updated_at=<Date2019-11-24.20:44:00.320>user='https://github.com/anntzer'
because inspect._findclass() tries to find the base class by parsing subclass.method.__qualname__ which is "make_subclass.<locals>.subclass.method" and chokes over .<locals>..
In the case where the method does rely on super(), there is another way we can go back to the "owning" class of the method: by looking up the contents of the __class__ cell (which is set up to make 0-arg super()).
Perhaps a __class__ cell could even be set up for all methods defined in dynamically created subclasses (i.e. whose __qualname__ includes .<locals>.), to help with introspection?
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: