From dc247664b9fc7cc9808960f75ddcce6f6896a698 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Fri, 20 Sep 2013 21:31:54 +1000 Subject: [PATCH] Promote __wrapped__ as official way to get wrapped object. --- docs/examples.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index c08f27d..5b200b4 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -326,7 +326,7 @@ manager, but at the same time can still be used as a decorator as before. class _FinalDecorator(FunctionWrapper): def __enter__(self): - self._self_lock = _synchronized_lock(self._self_wrapped) + self._self_lock = _synchronized_lock(self.__wrapped__) self._self_lock.acquire() return self._self_lock @@ -488,7 +488,7 @@ frowned on by some, but the implementation would be as follows. class _FinalDecorator(FunctionWrapper): def __enter__(self): - self._self_lock = _synchronized_lock(self._self_wrapped) + self._self_lock = _synchronized_lock(self.__wrapped__) self._self_lock.acquire() return self._self_lock