As mentioned , these two characteristics are required in python for flow control statements 正如所提到的,这两个特征是python中流控制语句所必需的。
For example , the following code shows a method block and a code block following a control statement 例如,下面的代码演示在控制语句之后出现的一个方法块和一个代码块:
This lets you control the execution of the statement until you resolve the code problem that is creating the loop 这样就能够在解决产生循环的代码问题之前控制语句的执行。
This list is fairly simple , and you may recognize these flow control statements from other programming languages 这个列表相当简单,并且您可能从其他编程语言认识了这些流控制语句。
Method in situations where you must control the sequence of statement types for example , insert before update 在必须控制语句类型顺序的情况下(例如, insert在update之前) ,应用程序可以调用
Method in situations where you must control the sequence of statement types for example , inserts before updates 在必须控制语句类型顺序的情况下(例如, insert在update之前) ,应用程序可以调用
Most procedural programming languages have some kind of control statements , and there is often overlap among languages 大多数程序化的编程语言都提供了某种形式的控制语句,这在语言间通常是共通的。
This would simply result in a syntax error because there is no controlling statement that requires a block to be separated from the rest of the code 这只会产生一个语法错误,因为没有任何控制语句要求将一个块与代码其余部分相分离。
However , much of the power and utility of any programming language comes from the ability to change execution order with control statements and loops 但是,任何编程语言的许多功能和实用工具都来自于使用控制语句和循环更改执行顺序的能力。