So far this patch only deletes an is_* function if it literally does
nothing but wrap a call to isinstance without even changing the name.
If there's a change in the class name because of a factory or if the
is_* function does something more complicated like test a few
different classes then that's one thing.  But to just wrap a call to
isinstance seems completely unnecessary to me, am I missing something?

-Jim

On Tue, Apr 10, 2012 at 2:49 AM, Volker Braun <vbraun.n...@gmail.com> wrote:
> I though the depreciation is for including is_* in the global namespace
> only. My impression was that they are to stay in the library code as an
> internal way to test that an argument is already of a suitable type.
> Generally, is_X(foo) is more strict than foo in X:
>
> sage: is_Integer(5/1)
> /home/vbraun/opt/sage-5.0.beta11/local/bin/sage-ipython:1:
> DeprecationWarning:
> Using is_Integer from the top level is deprecated since it was designed to
> be used by developers rather than end users.
> It most likely does not do what you would expect it to do.  If you really
> need to use it, import it from the module that it is defined in.
>   #!/usr/bin/env python
> False
>
> sage: 5/1 in ZZ
> True
>
> The latter tests that it can be converted, so you wouldn't be able to use it
> in ZZ's _element_constructor_(), say. Hence the need for is_Integer() in the
> library code.
>
>
>
>
>
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org



-- 
Die Dunkelheit... leitet die Musik.
Die Musik... leitet die Seele.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to