python类isint()的实例源码

newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __mul__(self, other):
        value = super(newint, self).__mul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return long(self) * other
        return value
newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __rmul__(self, other):
        value = super(newint, self).__rmul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return other * long(self)
        return value
newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __lshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for <<: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__lshift__(other))
newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __rshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for >>: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__rshift__(other))
newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __or__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for |: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__or__(other))
newint.py 文件源码 项目:Repobot 作者: Desgard 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __xor__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for ^: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__xor__(other))
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __mul__(self, other):
        value = super(newint, self).__mul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return long(self) * other
        return value
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __rmul__(self, other):
        value = super(newint, self).__rmul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return other * long(self)
        return value
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __lshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for <<: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__lshift__(other))
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __rshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for >>: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__rshift__(other))
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __or__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for |: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__or__(other))
newint.py 文件源码 项目:UMOG 作者: hsab 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __xor__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for ^: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__xor__(other))
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __mul__(self, other):
        value = super(newint, self).__mul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return long(self) * other
        return value
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __rmul__(self, other):
        value = super(newint, self).__rmul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return other * long(self)
        return value
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __lshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for <<: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__lshift__(other))
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __rshift__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for >>: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__rshift__(other))
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def __or__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for |: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__or__(other))
newint.py 文件源码 项目:blackmamba 作者: zrzka 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __xor__(self, other):
        if not isint(other):
            raise TypeError(
                "unsupported operand type(s) for ^: '%s' and '%s'" %
                (type(self).__name__, type(other).__name__))
        return newint(super(newint, self).__xor__(other))
newint.py 文件源码 项目:beepboop 作者: nicolehe 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __mul__(self, other):
        value = super(newint, self).__mul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return long(self) * other
        return value
newint.py 文件源码 项目:beepboop 作者: nicolehe 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __rmul__(self, other):
        value = super(newint, self).__rmul__(other)
        if isint(value):
            return newint(value)
        elif value is NotImplemented:
            return other * long(self)
        return value


问题


面经


文章

微信
公众号

扫码关注公众号