python学习总结 常见问题

来源:互联网 发布:卖软件的网站 编辑:程序博客网 时间:2024/05/29 03:18

一、TypeError: this constructor takes no arguments

1、双下划线写成了下划线:__init__写成了_init_

2、def的缩进不正确,之前多了空格(http://blog.sina.com.cn/s/blog_61b8694b0101p9h4.html)

3、Init写成了int:__init__写成了__int__

0 0
原创粉丝点击