code: def check_positive(value, strict=False):
      
      if not strict and value < 0:
          raise ValueError("Value must be positive or zero, not %s" % str(value))
      if strict and value <= 0:
          raise ValueError("Value must be positive, not %s" % str(value))
docs: Checks if variable is positive
  
      @param value: value to check
      @type value: C{integer types}, C{float} or C{Decimal}
  
      @return: None when check successful
  
      @raise ValueError: check failed