On Wed, Jan 10, 2018 at 10:50:04AM -0800, Travis Scrimshaw wrote:
> +1 for removing the is_X methods when they are trivial, e.g., just an
> isinstance check. However, there are some non-trivial is_X functions
> IIRC. So I am not convinced we should remove those.
+1 to Vincent and Travis's answers.
Just a complement: there is a semantic different between X in Foos()
-- is X already known to be a Foo -- and X.is_foo() -- really test if
X is a Foo, possibly running costly calculations if needed. So we need
to keep both. On the other hand, I would assume that is_Foo(X) is the
same as X.is_foo() in most cases; in that case, the former can safely
be deprecated, and we should do it. We may want to use the occasion to
switch some of the calls to X in Foos(), when it's more about "type
checking" than asking a math question.
Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" <
nth...@users.sf.net>
http://Nicolas.Thiery.name/