Skip to content

The parameter validation decorators should be reworked. #248

@jaroel

Description

@jaroel

Parameter validation is currently handled by function decorators. This has the following downsides:
A. Required parameters are defined with '=None'.
This is really non-pythonic and unhelpful to IDEs and (more) experienced programmers.
Required arguments should never have a default value.

B. Debugging the function calls is more-or-less impossible.
If you try to PDB into an plone.api function, the only thing you'll see is '(1)create()'. This is the same problem we have with TTW python scripts.

There's also the overhead of function calls, but that's clearly moot when you're creating content, or doing a workflow transition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions