Skip to content

Limit pint unit systems that are automatically considered #53

@euronion

Description

@euronion

Related to the issues in #51 , where ton was accidentally interpreted as US_ton:

Is it possible in pint to limit the unit systems that are available and considered?

ureg.default_systems = "SI" does not unregister the "US" and "imperial" system, it just changes the default:

ureg.default_system = "SI"

ureg.ton.systems
> frozenset({'SI', 'US', 'imperial'})

a) If it is possible, at least document it
b) Consider choosing "SI" / "mks" as exclusive default systems, with "Imperial" and other systems optionally to be enabled?

FYI @finozzifa : I opened an issue after our discussion to keep track of it, but no action needed on this particular issue atm.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions