【发布时间】:2013-02-19 20:15:15
【问题描述】:
我在 xcode 和 vi 上遇到了这个错误。 Python 说行类 LeastModel 有一个 IndentationError: expected an indented block。 我检查了我在 Xcode 上的偏好,以使用 4 个空格作为选项卡以及我一直在使用选项卡的所有地方。请帮帮我!
def make_model(data,model):
class LeastModel():
"""
linear system solved using linear least squares
This class serves as an example that fulfills the model interface needed by the ransa function.
"""
def __init__(self,input_columns,output_columns):
self.input_columns = input_columns
self.output_columns = output_columns
#self.debug = debug
【问题讨论】:
-
如果问题真的是你所说的
class LeastModel行,那么问题一定出在前面的行上(例如,在它之前有if x:行吗?)
标签: python xcode indentation