(depth=1, default='__main__')
| 1929 | |
| 1930 | |
| 1931 | def _caller(depth=1, default='__main__'): |
| 1932 | try: |
| 1933 | return sys._getframemodulename(depth + 1) or default |
| 1934 | except AttributeError: # For platforms without _getframemodulename() |
| 1935 | pass |
| 1936 | try: |
| 1937 | return sys._getframe(depth + 1).f_globals.get('__name__', default) |
| 1938 | except (AttributeError, ValueError): # For platforms without _getframe() |
| 1939 | pass |
| 1940 | return None |
| 1941 | |
| 1942 | def _allow_reckless_class_checks(depth=2): |
| 1943 | """Allow instance and class checks for special stdlib modules. |
no test coverage detected
searching dependent graphs…