Atelier Astra
  • Works
  • Mahjong
  • Puyo

Post for: #python (1 Post)

Open/Closed Intervals in Python Using Chained Comparisons

May 28, 2026 aerie
python

Check this out:

>>> T = Annotated[float, 1 < limits.range]
>>> T.__metadata__
(from (1, inf],)
>>> [x for x in 4 < b.range.step(0.5) <= 6] 
[4.5, 5.0, 5.5, 6.0]
Read more →

© 2024 Powered by Publii CMS :: Theme ported by the Publii Team