Skip to content

Deprecate is_* functions. #12824

@sagetrac-JStarx

Description

@sagetrac-JStarx

As discussed here: http://groups.google.com/group/sage-devel/browse_thread/thread/e8c2470e270f616b/c760f4a79d28f467?lnk=gst&q=is_#, functions of the form is_SomeName(x) should be deprecated.

This patch removes 106 of them and replaces them with calls to isinstance. The patch was created by running the attached python script. It searches through the source for functions of the form

def is_SomeName(x):
    """a docstring"""
    return isinstance(x, SomeName)

where SomeName is the class of a Sage object, deletes them, and replaces any calls with calls to isinstance. After the script ran I made sure sage built, passed all its tests, and I looked through the diff to make sure nothing silly happened.

CC: @nilesjohnson

Component: misc

Keywords: is_functions

Work Issues: split patch, docs do not build

Branch/Commit: u/rws/delete_some_of_the_depreciated_is___functions_ @ 4236760

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/12824

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions