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
评论列表
文章目录