There was an error while loading. Please reload this page.
1 parent b4cf7c5 commit cd29883Copy full SHA for cd29883
1 file changed
docs/decorators.rst
@@ -292,8 +292,14 @@ of ``@wrapt.decorator``. It intercepts descriptor binding so that
292
when the wrapper method is accessed through an instance of the state class,
293
the state instance is automatically stored on the resulting wrapper as a
294
named attribute. The ``name`` keyword argument controls the attribute name,
295
-allowing the state to be reached from the decorated function as
296
-``function.tracker``.
+allowing the state to be reached from the decorated function.
+
297
+::
298
299
+ >>> function()
300
301
+ >>> function.tracker.call_count
302
+ 2
303
304
For a more detailed treatment of this pattern, including how it composes
305
with instance methods, class methods and static methods, and how to support
0 commit comments