Skip to content

optimize Namespace #156

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Michael Bayer (@zzzeek)

its time to get around to this.

  1. the "file" and "module" arguments to <%namespace> become mutually exclusive. one or the other.

  2. Namespace breaks into TemplateNamespace, ModuleNamespace, and Namespace which still is used if there's no template or module.

  3. __getattr__ can now be broken down to not require the "has_def()" and "hasattr()" calls, just catch attributeerror and re-raise.

  4. more importantly, __getattr__ should put the resolved method into __dict__.

  5. when we do the lambda *args, **kwargs:callable_(context, *args, **kwargs), lets use functools.partial . its native

  6. inline _get_star(), plus the partial, should speed it up a bit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions