IndentationError:expected an indented block错误
来源:互联网 发布:淘宝上买玉镯子可靠吗 编辑:程序博客网 时间:2024/05/16 06:48
我是Python脚本语言的初学者,当然在学习的时候就会经常遇到错误,比如今天我就遇到了
IndentationError:expected an indented block这样的错误,如下图:
然后通过查解决错误的方法,我才知道:
Python语言是一款对缩进非常敏感的语言。最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分别的。
在编译时会出现这样的错IndentationError:expected an indented block说明此处需要缩进(也许是空格的缩进,也许是tab的缩进,这个需要自己排查),你只要在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。
一句话中如果有冒号的下一行往往要缩进,该缩进就缩进,一定得记住。
然后我缩进之后问题就自然解决了,请看下图:
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误解读
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误解决
- 错误:IndentationError: expected an indented block
- python错误:IndentationError:expected an indented block
- IndentationError:expected an indented block错误解决
- Python 错误:IndentationError: expected an indented block
- Python错误:IndentationError: expected an indented block
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block
- IndentationError: expected an indented block
- python问题:IndentationError:expected an indented block错误解决
- IndentationError:expected an indented block错误的解决办法
- 今天我也有自己的博客了W!
- Eclipse + Python 的安装和配置
- Eclipse + PyDev ----> Project interpreter not specified
- Vim 编辑器中的一些设置(字体大小+行号+配色方案)
- Android开发教程:shape和selector的结合使用
- IndentationError:expected an indented block错误
- PHP学习笔记 - 在Eclipse中使用XDebug调试代码 | Using XDebug debug code in eclipse
- protege、OWLviz 的DOT Error
- Python ImportError: No module named 'xml.sax'
- UnicodeEncodeError-----(Python)
- Myeclipse+Tomcat配置
- Jena的环境配置
- 使用easy_install安装BeautifulSoup——Python
- IE6——'JSON' is undefined错误