Skip to content

Commit b56d834

Browse files
committed
use list(points) to copy input list
1 parent d056bed commit b56d834

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎plotdevice/lib/pathmatics.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def findpath(points, curvature=1.0):
479479
# The list of points consists of Point objects,
480480
# but it shouldn't crash on something straightforward
481481
# such as someone supplying a list of (x,y)-tuples.
482-
points = points.copy() # Make a copy to avoid modifying the input
482+
points = list(points) # copy to avoid modifying the input
483483
for i, pt in enumerate(points):
484484
if isinstance(pt, (tuple, list)):
485485
points[i] = Point(pt[0], pt[1])

0 commit comments

Comments
 (0)