From: 保. <bg...@gm...> - 2008-06-30 17:19:13
|
Hi. I have a naive question on min, max of class String in validators.py == def validate_python(self, value, state): if (self.max is not None and value is not None and len(value) > self.max): raise Invalid(self.message('tooLong', state, max=self.max), value, state) == why not len(value) >= self.max ? Python build-in range(start, stop, step), does not have stop in the resulting range. i.e. range(1. 3) => [1, 2] I know it may be hard to change now due to impacts to users. I felt it bit strange, so I want to know thoughts behind it. -- Nori |