Skip to content

Using @wraps in decorators #23

@matham

Description

@matham

Using @wraps in decorators is a common pattern to help us know where the decorator originated when debugging or when saving it as a name, otherwise, when you get a hold of the function, it's impossible to know where it came from.

Also, @wraps makes sure the doc string etc match the original function.

Originally posted by @matham in #1 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions