Skip to content

Consider Abstract Base Classes for Quantity and Unit #3650

@mhvk

Description

@mhvk

Following discussion on how to let Time interact with units without relying overly on ducktyping, @embray suggested (#3648 (comment)) a Quantity abstract base class, with which objects could register to let other code know they can be treated as quantities with a unit. For Unit itself, this would also be useful, in particular for things like functional units which share many but not all of the properties of normal units (see
#1894 (comment)). This issue is to remind us of these thoughts.

p.s. Such a base class might also go quite a long way towards ensuring interoperability with other unit implementations (such as that by amuse).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions