示例#1
0
文件: Range.py 项目: lepy/Ranger
    def atLeast(val):
        """ Makes range including all values greater than or equal to
        some value (i.e. [val, inf))

        Parameters
        ----------
        val : comparable
            The lower bound

        Raises
        ------
        ValueError
            If type not comparable

        Returns
        -------
        A Range object [val, inf)
        """
        Range._validate_cutpoints(val)
        theType = Range._get_type(val)
        return Range(Cut.belowValue(val, theType=theType),
                     Cut.aboveAll(theType=theType))
示例#2
0
文件: article.py 项目: m-ober/byceps
def range_all(theType):
    """Create a range than contains every value of the given type."""
    return Range(
        Cut.belowAll(theType=theType),
        Cut.aboveAll(theType=theType))
示例#3
0
def range_all(theType: Any) -> Range:
    """Create a range than contains every value of the given type."""
    return Range(Cut.belowAll(theType=theType), Cut.aboveAll(theType=theType))
示例#4
0
文件: CutTest.py 项目: er432/Ranger
 def test_aboveAll(self):
     if debug: print("Testing aboveAll")
     theCut = Cut.aboveAll(int)
     self.assertFalse(theCut.belowAll)
     self.assertTrue(theCut.aboveAll)
     self.assertIsNone(theCut.point)        
示例#5
0
 def test_aboveAll(self):
     if debug: print("Testing aboveAll")
     theCut = Cut.aboveAll(int)
     self.assertFalse(theCut.belowAll)
     self.assertTrue(theCut.aboveAll)
     self.assertIsNone(theCut.point)