-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The chance that an existing implementation matches the exact namespace and name of the defined constants is slim (I don't know any code that does). Therefore, it's fair to say all existing codes must do some wrapping of their constants to conform to the API. In which case it is much more straightforward for everyone to have the constants in the cosmo object itself:
class HasC(Protocol):
@property
def c(self) -> Any: # noqa: ANN401
"""Speed of light in km s-1."""
...
class HasG(Protocol):
@property
def G(self) -> Any: # noqa: ANN401
"""Gravitational constant G in pc km2 s-2 Msol-1."""
...Metadata
Metadata
Assignees
Labels
No labels