chp7-6 python 空值判断
def greet(x):
if x == None:
print 'Hello, world.'
else:
print 'Hello,',x
greet()报错
TypeError: greet() takes exactly 1 argument (0 given)
可否解释一下,为什么这里的空值判断就报错了?
def greet(x):
if x == None:
print 'Hello, world.'
else:
print 'Hello,',x
greet()报错
TypeError: greet() takes exactly 1 argument (0 given)
可否解释一下,为什么这里的空值判断就报错了?
2015-04-27
举报