Skip to content

Commit

Permalink
More verbose parameter setting
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarago committed Sep 9, 2013
1 parent 31e669c commit 7d9050d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions concert/base.py
Expand Up @@ -198,13 +198,13 @@ def __init__(self, name, fget=None, fset=None,
self._value = None
self.__doc__ = doc

self.upper = upper or float('Inf')
self.lower = lower or -float('Inf')
self.upper = upper if upper is not None else float('Inf')
self.lower = lower if lower is not None else -float('Inf')

if unit and not upper:
if unit and upper is None:
self.upper = self.upper * unit

if unit and not lower:
if unit and lower is None:

This comment has been minimized.

Copy link
@tfarago

tfarago Sep 9, 2013

Author Contributor

Otherwise if one does p = Parameter(lower=0), then p.lower is -Inf. I found a case when the lower limit is really zero.

self.lower = self.lower * unit

def __lt__(self, other):
Expand Down

0 comments on commit 7d9050d

Please sign in to comment.