码迷,mamicode.com
首页 > 其他好文 > 详细

报错"module" object is not callable

时间:2014-11-14 22:46:32      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:blog   http   ar   使用   on   2014   art   log   ef   

bubuko.com,布布扣

由于未找到原作者出处,只能说从这个博客上学习了:转自http://blog.csdn.net/liuyuehui110/article/details/7249307

原因分析:

Python 导入模块有两种方式:

  • import module
  • from module import *

区别是前者导入的模块使用时要加上模块名module的限定,后者不需要

如图:我们需要改成:

ct = ClassTest.ClassTest(‘tet‘,50)

方能正常运行。

bubuko.com,布布扣

报错"module" object is not callable

标签:blog   http   ar   使用   on   2014   art   log   ef   

原文地址:http://www.cnblogs.com/kinyoung/p/4098278.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!