debug¶
-
class
jnrbase.debug.
DebugPrint
(_DebugPrint__handle)[source]¶ Verbose print wrapper for debugging.
Configure new DebugPrint handler.
- Parameters
__handle – File handle to override
Functions¶
Examples¶
>>> @on_enter()
... def f():
... print('Hello')
>>> f()
Entering 'f'(<function f at 0x...>)
Hello
>>> f = on_exit(f)
>>> f()
Entering 'f'(<function f at 0x...>)
Hello
Exiting 'f'(<function f at 0x...>)
>>> on_enter(lambda: None)()
Entering '<lambda>'(<function <lambda> at 0x...>)