A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-May/035459.html below:

[Python-Dev] odd interpreter feature

[Python-Dev] odd interpreter featureTim Peters tim.one@comcast.net
Wed, 07 May 2003 10:42:22 -0400
[Skip Montanaro]
> I was editing the tutorial just now and noticed the secondary prompt (...)
> in a situation where I didn't think it was appropriate:
>
>     >>> # The argument of repr() may be any Python object:
>     ... repr(x, y, ('spam', 'eggs'))
>     "(32.5, 40000, ('spam', 'eggs'))"
>
> It's caused by the trailing colon at the end of the comment.  I
> verified it using current CVS:
>
>     >>> hello = 'hello, world\n' hellos = repr(hello) print hellos
>     'hello, world\n'
>     >>> # hello:
>     ...
>     >>>
>
> Shouldn't the trailing colon be ignored in comments?  Bug,
> feature or wart?

This changed at some very early point in Python's life.  I don't think the
trailing colon is relevant:

>>> 1+2
3
>>> # hello
...
>>>




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