Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteb2322d

Browse files
committed
Use SyntaxError invalid range in tutorial introduction example
Use output from a 3.10+ REPL, showing invalid range, for theSyntaxError examples in the tutorial introduction page.
1 parent87b9b4e commiteb2322d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎Doc/tutorial/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ This only works with two literals though, not with variables or expressions::
234234
>>> prefix 'thon' # can't concatenate a variable and a string literal
235235
File "<stdin>", line 1
236236
prefix 'thon'
237-
^
237+
^^^^^^
238238
SyntaxError: invalid syntax
239239
>>> ('un' * 3) 'ium'
240240
File "<stdin>", line 1
241241
('un' * 3) 'ium'
242-
^
242+
^^^^^
243243
SyntaxError: invalid syntax
244244

245245
If you want to concatenate variables or a variable and a literal, use ``+``::
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update tutorial introduction output to use 3.10+ SyntaxError invalid range.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp