Processing.py - 类定义上的未知错误 [英] Processing.py - Unknown Error on Class Definition
本文介绍了Processing.py - 类定义上的未知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道如何解决这个错误.
I have no idea how to fix this error.
也许在此行之前的某处有一个左括号或引号?
Maybe there's an open parenthesis or quotation mark somewhere before this line?
这段代码有什么问题?
Class Ribbon: # I got an error on this line!
def __init__(self, xpos, ypos, m, g):
self.x=xpos
self.y=ypos
self.mass=m
self.gravity=g
..
def update(self, xpos, ypos):
..
def display(self, xpos, ypos):
..
推荐答案
这是你的问题:
Class Ribbon (object):
def __init__(self, xpos, ypos, m, g):
self.x=xpos
self.y=ypos
self.mass=m
self.gravity=g
还要记住,其他 def 也必须正确缩进
also remember that other def must be indented properly as well
这篇关于Processing.py - 类定义上的未知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文