Getty fully qualified class name from class object
Ian Pilcher
arequipeno at gmail.com
Wed Aug 23 15:05:44 EDT 2023
On 8/22/23 11:13, Greg Ewing via Python-list wrote:
> Classes have a __module__ attribute:
>
> >>> logging.Handler.__module__
> 'logging'
Not sure why I didn't think to look for such a thing. Looks like it's
as simple as f'{cls.__module__}.{cls.__qualname__}'.
Thanks!
--
========================================================================
Google Where SkyNet meets Idiocracy
========================================================================
More information about the Python-list
mailing list