Commit e8aa372
Make sure the function was called (yasoob#154)
* Make sure the function was called
Make sure the function was called.
* fix class decorator bugs
In class decorator, @decorator will call it once, and put the func into Class(func). So if wrote like this `@logit()`, it will call __call__ function.
* Update decorators.rst1 parent b0b6643 commit e8aa372
1 file changed
Lines changed: 20 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
395 | 398 | | |
396 | | - | |
397 | | - | |
| 399 | + | |
| 400 | + | |
398 | 401 | | |
399 | 402 | | |
400 | | - | |
| 403 | + | |
401 | 404 | | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
| |||
412 | 420 | | |
413 | 421 | | |
414 | 422 | | |
415 | | - | |
416 | | - | |
417 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
418 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
419 | 431 | | |
420 | 432 | | |
421 | 433 | | |
| |||
0 commit comments