A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-August/145806.html below:

[Python-Dev] Rewrite @contextlib.contextmanager in C

[Python-Dev] Rewrite @contextlib.contextmanager in CChris Angelico rosuav at gmail.com
Tue Aug 9 14:49:41 EDT 2016
On Wed, Aug 10, 2016 at 4:43 AM, Giampaolo Rodola' <g.rodola at gmail.com> wrote:
> -        return self.__class__(self.func, self.args, self.kwds)
> +        func, args, kwds = self.funcak
> +        return self.__class__(func, args, kwds)

return self.__class__(*self.funcak)

>      @wraps(func)
>      def helper(*args, **kwds):
>          return _GeneratorContextManager(func, args, kwds)
> +
> +    update_wrapper(helper, func)

Isn't update_wrapper exactly what @wraps is doing for you?

ChrisA
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4