Python学习之while循环的Ture与False/TypeError: settings() takes no arguments
2019-01-10 11:23
951 查看
Python学习之while循环的Ture与False/TypeError: settings() takes no arguments
while循环的成立条件
while 0 = while False
while 1 = while Ture
ture 的常见情况有:
数字
while -1 ; while 1 ;while 16 ;while -10; while x x不等于0。
其他变量
while ‘你好’ ; while ’ 0 ’ ;while[1,2];while(1,2) ,while x 其中len(x)>0
Flase的常见情况有:
数字
while 0
其他变量
while’ ';while[];while(),while x 其中len(x)=0
TypeError: settings() takes no arguments问题
出错背景:
我先弄了的setting的代码文件,里面储存了一个setting类。
在alien_invasion文件里,需要调用该类
出错的setting代码如图:
单独运行该段代码能正常运行
但运行调用他的alien_invasion 时
出现了报错
究其原因:正常__init__ 前后是双下划线,而我的是单下划线,样子虽然相似,单等于我没有定义init初始化函数
相关文章推荐
- TypeError: this constructor takes no arguments(Python 学习遇到的错误1)
- python:TypeError: this constructor takes no arguments解决方法
- Python 3.5 + PyInstaller 3.2.1打包exe出错,TypeError: read() takes no keyword arguments
- python之TypeError: this constructor takes no arguments
- type error:this constructor takes no arguments的错误提示(python)
- python 使用装饰器提示:TypeError: wrapper() takes no arguments (1 given)
- Python中报错提示:TypeError: Student() takes no arguments
- python调用语音模块报错TypeError:NoneType takes no arguments
- Python开发调用语音模块报错:TypeError:NoneTypetakesnoarguments
- TypeError: this constructor takes no arguments
- python报错:“TypeError: func() takes 0 positional arguments but 1 was given”
- Python 类创建ERROR: xxx() takes no arguments
- 在Python中TypeError: object() takes no parameters新手问题的解决办法
- python3中遇到的一个bug TypeError: is_empty() takes 0 positional arguments but 1 was given
- Python3问题TypeError: object() takes no parameters
- TypeError: this constructor takes no arguments
- python中新手定义类时出现的致命的小问题之TypeError: object() takes no parameters
- 运行python 时出现TypeError: obj() takes no parametrs
- Python_TypeError:object() takes no parameters
- python "TypeError: object() takes no parameters"