_g_l_y_f.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:otRebuilder 作者: Pal3love 项目源码 文件源码
def __imul__(self, other):
        """
        >>> g = GlyphCoordinates([(1,2)])
        >>> g *= (2,.5)
        >>> g *= 2
        >>> g
        GlyphCoordinates([(4.0, 2.0)])
        >>> g = GlyphCoordinates([(1,2)])
        >>> g *= 2
        >>> g
        GlyphCoordinates([(2, 4)])
        """
        if isinstance(other, Number):
            other = (other, other)
        if isinstance(other, tuple):
            if other == (1,1):
                return self
            assert len(other) ==  2
            self.scale(other)
            return self
        return NotImplemented
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号