expected an indented block
expected an indented block
在初步使用Python的时候遇到了“ expected an indented block”报错信息,查询相关的博客得知是因为一款对缩进非常敏感的语言。
在编译时会出现这样的错IndentationError:expected an indented block说明此处需要缩进,你只要在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。
参考地址:http://blog.csdn.net/neilhappy/article/details/7724959
expected an indented block的更多相关文章
- python中IndentationError: expected an indented block错误的解决方法
IndentationError: expected an indented block 翻译为IndentationError:预期的缩进块 解决方法:有冒号的下一行要缩进,该缩进就缩进
- [转]python问题:IndentationError:expected an indented block错误解决
分类: python学习笔记2012-07-07 17:59 28433人阅读 评论(4) 收藏 举报 python语言 原文地址:http://hi.baidu.com/delinx/item/17 ...
- python问题:IndentationError:expected an indented block错误解决《转》
python问题:IndentationError:expected an indented block错误解决 标签: python语言 2012-07-07 17:59 125145人阅读 评论( ...
- python问题:IndentationError:expected an indented block错误解决
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- 编译错误:expected an indented block
python 对缩进要求非常严格,当运行时出现以下几种情况时,就需要修改缩进: 1.expected an indented block 直接缩进4个space空格或者一个tab.
- IndentationError : expected an indented block
IndentationError:在python的条件语句出现 expected an indented block问题 是指缩进问题,比如for循环里面的print前面需要四个空格. Python语 ...
- IndentationError:expected an indented block错误解决
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- Python问题1:IndentationError:expected an indented block
Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的python程序员,也可能陷入陷阱当中.最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分 ...
- python 中出现 “IndentationError: expected an indented block” 问题
python 学习 在定义Python函数的时候如下 >>>def hello() . . .print "hello" 这样会报错的,报错如下: Indenta ...
随机推荐
- C# GUID转换成16位字符串或19位数字并确保唯一
/// <summary> /// 根据GUID获取16位的唯一字符串 /// </summary> /// <param name=\"guid\" ...
- VBA笔记(一)
开启VBA编程环境--VBE 方法一:按<Alt+F11>组合建 方法二:查看代码 宏设置 当然启用宏的设置方式不同,宏的启动方式也不一样. 首先打开"office 按钮&quo ...
- [MapReduce] Google三驾马车:GFS、MapReduce和Bigtable
声明:此文转载自博客开发团队的博客,尊重原创工作.该文适合学分布式系统之前,作为背景介绍来读. 谈到分布式系统,就不得不提Google的三驾马车:Google FS[1],MapReduce[2],B ...
- Go - 项目收藏
谷歌官方维护了一个基于go语言的开源项目列表: https://github.com/golang/go/wiki/Projects Web框架 web.go.beego Go项目 httpmq:A ...
- PHP5不重新编译,如何安装自带的未安装过的扩展,如soap扩展?
在虚拟机的CentOS5.5中,一键安装了PHP运行环境,但发现并没有 soap 扩展,而近期项目用需要用到 webservice. 上述的一键安装(lamp0.4),其实是源码编译安装,PHP配置文 ...
- LwIP移植和使用
LwIP移植和使用 本手册基于lwip-1.4.x编写,本人没有移植过1.4.0之前的版本,更早的版本或许有差别.如果看官发现问题欢迎联系<QQ: 937431539 email: 93743 ...
- Ackerman函数的栈实现
一.Ackerman函数: ackerman函数的定义如下: 二.Ackerman函数的递归实现: 利用递归来实现ackerman函数是比较简单的: /*Sample Input: 0 1 1 1 S ...
- 【krpano】krpano xml资源解密(破解)软件说明与下载
欢迎加入qq群551278936讨论krpano技术以及获取最新软件. 最新版本软件下载:http://www.cnblogs.com/reachteam/p/5455675.html 该软件已经 ...
- Effective C++ -----条款54:让自己熟悉包括TR1在内的标准程序库
C++ 标准程序库的主要机能由STL.iostream.locales 组成.并包含C99 标准程序库. TR1 添加了只能指针(例如 tr1::shared_ptr).一般化函数指针(tr1::fu ...
- Spring Security控制权限
Spring Security控制权限 1,配置过滤器 为了在项目中使用Spring Security控制权限,首先要在web.xml中配置过滤器,这样我们就可以控制对这个项目的每个请求了. < ...