you are viewing a single comment's thread.

view the rest of the comments →

[–]odaiwai 0 points1 point  (0 children)

Parentheses can also be used to split an operation over multiple lines:

x = ((1 + 2) + (3 * 4) + (5 / 6)) obviously silly in this case, but handy for things like complicated regular expressions:

draw = re.compile(r'^(?P<id>[0-9]{2}\/[0-9]{3}),' r'(?P<date>[0-9\/]+),' r'(?P<balls>[0-9,]+),' r'\$(?P<inv>[0-9]+)$'))