Return object name.
(obj)
| 26 | |
| 27 | |
| 28 | def qualname(obj): |
| 29 | """Return object name.""" |
| 30 | if not hasattr(obj, '__name__') and hasattr(obj, '__class__'): |
| 31 | obj = obj.__class__ |
| 32 | q = getattr(obj, '__qualname__', None) |
| 33 | if '.' not in q: |
| 34 | q = '.'.join((obj.__module__, q)) |
| 35 | return q |
| 36 | |
| 37 | |
| 38 | def instantiate(name, *args, **kwargs): |