6. 简单语句 Simple statements

Simple statements are comprised within a single logical line. Several simple statements may occur on a single line separated by semicolons. The syntax for simple statements is:

简单语句可以在一个逻辑行中表达. 某些简单语句可以用分号分隔而占据一行.简单语句句法如下:

simple_stmt  ::=  expression_stmt
    | assert_stmt
    | assignment_stmt
    | augmented_assignment_stmt
    | pass_stmt
    | del_stmt
    | print_stmt
    | return_stmt
    | yield_stmt
    | raise_stmt
    | break_stmt
    | continue_stmt
    | import_stmt
    | global_stmt
    | exec_stmt
Download entire grammar as text.



子节目录