这是我需要转换为 while 循环的 for 循环。我认为这会起作用,但它给了我一个没有移动属性的错误。这是一个创建人脸图形图像的程序,因此“shapeList”中的所有“形状”都是头部、鼻子、嘴巴、眼睛。面部需要沿着窗口的边缘移动。
def moveAll(shapeList, dx, dy):
for shape in shapeList:
shape.move(dx, dy)
def moveAll(shapeList, dx, dy):
shape = []
while shape != shapeList:
shapeList.append(shape)
shape.move(dx, dy)
蛊毒传说
胡说叔叔
米脂
相关分类