[TupleVariation] Rewrite getUsedPoints() as list comprehension
This commit is contained in:
parent
12c88cc3a4
commit
8dae627d3f
@ -48,11 +48,7 @@ class TupleVariation(object):
|
|||||||
return self.coordinates == other.coordinates and self.axes == other.axes
|
return self.coordinates == other.coordinates and self.axes == other.axes
|
||||||
|
|
||||||
def getUsedPoints(self):
|
def getUsedPoints(self):
|
||||||
result = set()
|
return set([i for i,p in enumerate(self.coordinates) if p is not None])
|
||||||
for i, point in enumerate(self.coordinates):
|
|
||||||
if point is not None:
|
|
||||||
result.add(i)
|
|
||||||
return result
|
|
||||||
|
|
||||||
def hasImpact(self):
|
def hasImpact(self):
|
||||||
"""Returns True if this TupleVariation has any visible impact.
|
"""Returns True if this TupleVariation has any visible impact.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user