Open
Description
运行8-16print_models.py
程序
import printing_functions
unprinted_designs = ['iphone case', 'robot pendant', 'dodecahedron']
completed_models = []
print_models(unprinted_designs, completed_models)
show_completed_models(completed_models)
报错信息
Traceback (most recent call last):
File "/home/zoctopus/code/github_organization/programming-book-practice/Python-Crash-Course-Homework/chapter08/print_models.py", line 6, in <module>
print_models(unprinted_designs, completed_models)
NameError: name 'print_models' is not defined
思考
按照书上讲解,import
文件名后,这个被引入文件里的所有定义的函数都是通用的。
为什么报not defined
的错误呢?
Metadata
Metadata
Assignees
Labels
No labels