From b8e5c646a3387c28b67ac26d96a6846bd964fa64 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Thu, 5 Sep 2013 21:58:46 +1000 Subject: [PATCH] Remove Python 3 keyword only example from quick start documentation. --- docs/quick-start.rst | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/docs/quick-start.rst b/docs/quick-start.rst index 5978559..f1bd369 100644 --- a/docs/quick-start.rst +++ b/docs/quick-start.rst @@ -49,26 +49,6 @@ the inner wrapper when the wrapped function is called. def function(): pass -If using Python 3, you can use the keyword arguments only syntax to force -use of keyword arguments when the decorator is used. - -:: - - import wrapt - - def with_keyword_only_arguments(*, myarg1, myarg2): - @wrapt.decorator - def wrapper(wrapped, instance, args, kwargs): - return wrapped(*args, **kwargs) - return wrapper - - @with_keyword_only_arguments(myarg1=1, myarg2=2) - def function(): - pass - -Any decorator you create can be applied to normal functions, instance -methods, class methods, static methods or classes. - When applied to a normal function or static method, the wrapper function when called will be passed ``None`` as the ``instance`` argument.