mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 02:14:04 +00:00
Mention the option of decorating classes in the README.md
This commit is contained in:
parent
5ed81cb848
commit
76fa19e4ee
1 changed files with 7 additions and 0 deletions
|
|
@ -152,6 +152,13 @@ On multi-threaded apps identify which thread are snooped in output:
|
|||
|
||||
PySnooper supports decorating generators.
|
||||
|
||||
If the decorator is applied to a class, PySnooper will decorate all of its instance methods. If you use this feature, you should be aware
|
||||
of the behaviour when snooping on decorated functions:
|
||||
|
||||
* If any methods have existing decorators, and those decorators return functions, it is the decorated method that will be snooped.
|
||||
* Some decorators do not return functions (rather, they return an instance of a class with a `__call__` method).
|
||||
This includes the `@property` builtin. In these cases, the decorated method will not be snooped at all.
|
||||
|
||||
You can also customize the repr of an object:
|
||||
|
||||
```python
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue