INNER CODE UNIT · Python

__eq__

mongodb/mongo-cxx-driver · etc/calc_release_version.py:74

    def __eq__(self, other):
        self_tuple = self.major, self.minor, self.micro, self.prerelease
        other_tuple = other.major, other.minor, other.micro, other.prerelease
        return self_tuple == other_tuple


def parse_version(ver):
    return Version(ver)


parser = optparse.OptionParser(description=__doc__)
parser.add_option('--debug', '-d', action='store_true', help='Enable debug output')
parser.add_option('--next-minor', action='store_true', help='Calculate the next minor version instead of the current')
args, pos = parser.parse_args()
assert not pos, 'No positional arguments are expected'


_DEBUG = args.debug  # type: bool

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…