_g_l_y_f.py 文件源码

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

项目:otRebuilder 作者: Pal3love 项目源码 文件源码
def __itruediv__(self, other):
        """
        >>> g = GlyphCoordinates([(1,3)])
        >>> g /= (.5,1.5)
        >>> g /= 2
        >>> g
        GlyphCoordinates([(1.0, 1.0)])
        """
        if isinstance(other, Number):
            other = (other, other)
        if isinstance(other, tuple):
            if other == (1,1):
                return self
            assert len(other) ==  2
            self.scale((1./other[0],1./other[1]))
            return self
        return NotImplemented
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号