1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
5 # Jockey is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
10 # Jockey is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 class IntervalTypeClass:
17 def typeCheck(self, val):
18 if type(val) in (types.IntType, types.LongType, types.FloatType,
21 return "Expecting a number or a function, but received '%s'", val
22 def typeDescription(self):
23 return "A number or function"
24 def varDescription(self, name):
25 return "A number or function"
27 IntervalType = IntervalTypeClass()