frequenz-floss / frequenz-core-python

Core utilities to complement Python's standard library
https://frequenz-floss.github.io/frequenz-core-python/
MIT License
0 stars 2 forks source link

Bounds: Make `lower` and `upper` keyword-only to avoid mistakes #14

Closed llucax closed 5 months ago

llucax commented 5 months ago

Since both have the same type, it is very confusing if someone writes Bounds(1, 2). Which is which? It should force users to use Bounds(lower=1, upper=2).

llucax commented 5 months ago

Now that Bounds will be renamed to Interval (#19) I'm not so convinced about this, for intervals I think it is much more obvious that it should be start, end, so closing for now. Feel free to reopen if you don't agree!