Skip to content

refactoring -- remove make_xxx() function #12

@podhmo

Description

@podhmo

define function such like below.

def make_range(range_, loose):
    if isinstance(range_, Range) and range_.loose == loose:
        return range_

    # if (!(this instanceof Range))
    #    return new Range(range, loose);
    return Range(range_, loose)

I have defined these functions for js and python compatibility. but these are needless.

using __new__()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions