[Bf-python] API refactoring considerations
Ken Hughes
khughes at pacific.edu
Wed May 31 16:28:30 CEST 2006
Gilbert, Joseph T. wrote:
> 2) We have always clamped input to whatever the internal range is and
> have not thrown an error. In theory though, it may be better to throw an
> error because the user may have expected a certain result and didn't
> realize that his value got clamped. All the other methods throw
> AttributeError when they receive unexpected parameters. I think in this
> case though we need to throw a ValueError because we have the correct
> type of argument but it's the wrong value for the method.
I don't think we should normally be throwing AttributeErrors; IIRC it is
supposed to happen if the attribute doesn't exist.
Ken
More information about the Bf-python
mailing list