Hynek Schlawack 8/1/2016

Please Fix Your Decorators

Read Original

This technical article explains a common flaw in Python decorators where using `functools.wraps` incorrectly can still destroy a function's signature and metadata. It details the problems this causes for introspection, debugging, and frameworks like Pyramid, and provides guidance on creating correct decorators that preserve callable signatures.

Please Fix Your Decorators

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week