Skip to content

Discussion: Allow push_scope to act as a decorator? #544

Closed
@a-d-collins

Description

@a-d-collins

In some scenarios it is desirable to have a specific scope attached to every call of a given method. Instead of pushing a scope in every caller of that method it could make more sense to decorate the method with a pushed scope and then modify that temporary scope at the top of the method (or even assign the scope attributes in the decorator call).

As found in #523, bootstrapping the current push_scope API with decorator functionality is not simple. It seems that some amount of API-breakage is necessary in order allow push_scope to work as a decorator. Due to this, it's a good idea to discuss the intentions of and use cases for push_scope.

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