A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-February/042842.html below:

[Python-Dev] What is the ":" for in python?

[Python-Dev] What is the ":" for in python? [Python-Dev] What is the ":" for in python?Barry Scott barry at barrys-emacs.org
Sat Feb 28 04:11:10 EST 2004
At 27-02-2004 19:39, Tom Emerson wrote:
>You could write
>
>if x > 10   \
>and x < 20:
>      do_in_range()

I don't like using backslash line continuation. Too many ways to mess up,
putting comments or white space after the \ may or may not work. And are
the continuation rules the same of C and make or different?

I cannot write:

if x > 10   \    # check lower bound
and x < 20:      # check upper bound
      do_in_range()

   File "L:\Users\barry\a.py", line 2
     if x > 10   \    # check lower bound
                                         ^
SyntaxError: invalid token

Barry



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4