Skip to content

Providing support for constants in Python code #573

Closed
@pfalcon

Description

@pfalcon

I told there's optimization itch... (again, or finally). So, we discussed this already, and there's support for native modules already, so can we have:

from micropython import const

VAL = const(100)

After that, VAL is subject to constant propagation per existing compiler support. Initial implementation can do just intra-module propagation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementFeature requests, new feature implementations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions