sandman2 icon indicating copy to clipboard operation
sandman2 copied to clipboard

Counter-intuitive naming

Open sjbrown opened this issue 9 years ago • 0 comments

Hi, sorry for the brevity - just something I noticed that irked me:

error_message = is_valid_method(self.__model__, resource)

I would expect a functioned named is_valid_method(...) to return True if the endpoint usage was valid. Instead, if it returns an error_message (which evaluates to True), that indicates it wasn't a valid usage.

Maybe a name like validation_errors or validate_method would be more intuitive.

sjbrown avatar Oct 04 '16 17:10 sjbrown