ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH
advanced | search help

Reference
ActivePython 2.4
Python Documentation
Language Reference
6. Simple statements
6.1 Expression statements
6.2 Assert statements
6.3 Assignment statements
6.4 The pass statement
6.5 The del statement
6.6 The print statement
6.7 The return statement
6.8 The yield statement
6.9 The raise statement
6.10 The break statement
6.11 The continue statement
6.12 The import statement
6.13 The global statement
6.14 The exec statement

MyASPN >> Reference >> ActivePython 2.4 >> Python Documentation >> Language Reference >> 6. Simple statements
ActivePython 2.4 documentation


6.1 Expression statements

Expression statements are used (mostly interactively) to compute and write a value, or (usually) to call a procedure (a function that returns no meaningful result; in Python, procedures return the value None). Other uses of expression statements are allowed and occasionally useful. The syntax for an expression statement is:

Download entire grammar as text.

An expression statement evaluates the expression list (which may be a single expression).

In interactive mode, if the value is not None, it is converted to a string using the built-in repr()function and the resulting string is written to standard output (see section 6.6) on a line by itself. (Expression statements yielding None are not written, so that procedure calls do not cause any output.)

See About this document... for information on suggesting changes.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved