Skip to content

Commit

Permalink
Switched from mathematical range notation to Python expr
Browse files Browse the repository at this point in the history
  • Loading branch information
jbednar committed Sep 23, 2023
1 parent f0e3a09 commit a289244
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -3635,9 +3635,10 @@ def _get_param_repr(key, val, p, vallen=30, doclen=40):
# Numeric bounds use ( and [ to indicate exclusive and inclusive
bl,bu = p.bounds
il,iu = p.inclusive_bounds
lb = ('[' if il else '(') + ('-∞' if bl is None else str(bl))
ub = ('∞' if bu is None else str(bu)) + (']' if iu else ')')
range_ = lb + ', ' + ub

lb = '' if bl is None else ('>=' if il else '>') + str(bl)
ub = '' if bu is None else ('<=' if iu else '<') + str(bu)
range_ = lb + (', ' if lb and bu else '') + ub
else:
range_ = repr(p.bounds)
elif hasattr(p, 'objects') and p.objects:
Expand Down

0 comments on commit a289244

Please sign in to comment.