Skip to content

Support for function importing via regex #125295

@JosephTJennings

Description

@JosephTJennings

Feature or enhancement

Proposal:

Idea: from database_api import update_* 
Current: from database_api import update_success, update_failure, update_running, update_initialized

This could clean up some code bases by allowing users to regex match some functions when importing. Full Regex matching may be slightly difficult, as an MVP, support for asterisks (*) matching would go a long way.
In the above codeblock, this would import all functions which start with "update_" from the module database_api.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions