DAGDA SEARCH | Back to results | Support

2.1.5 Implicit line joining

Source: https://docs.python.org/2.0/ref/implicit-joining.html

Previous Page Up One Level Next Page Python Reference Manual Contents Index
Previous: 2.1.4 Explicit line joining Up: 2.1 Line structure Next: 2.1.6 Blank lines


2.1.5 Implicit line joining

Expressions in parentheses, square brackets or curly braces can be split over more than one physical line without using backslashes. For example:

month_names = ['Januari', 'Februari', 'Maart',      # These are the
               'April',   'Mei',      'Juni',       # Dutch names
               'Juli',    'Augustus', 'September',  # for the months
               'Oktober', 'November', 'December']   # of the year

Implicitly continued lines can carry comments. The indentation of the continuation lines is not important. Blank continuation lines are allowed. There is no NEWLINE token between implicit continuation lines. Implicitly continued lines can also occur within triple-quoted strings (see below); in that case they cannot carry comments.


Previous Page Up One Level Next Page Python Reference Manual Contents Index
Previous: 2.1.4 Explicit line joining Up: 2.1 Line structure Next: 2.1.6 Blank lines


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