Closes #14343: avoid shadowing builtin input() in example code.

This commit is contained in:
Georg Brandl 2012-03-17 17:26:27 +01:00
parent ce54617260
commit 5a607b06d6
1 changed files with 2 additions and 2 deletions

View File

@ -1123,7 +1123,7 @@ creates a phonebook.
First, here is the input. Normally it may come from a file, here we are using First, here is the input. Normally it may come from a file, here we are using
triple-quoted string syntax: triple-quoted string syntax:
>>> input = """Ross McFluff: 834.345.1254 155 Elm Street >>> text = """Ross McFluff: 834.345.1254 155 Elm Street
... ...
... Ronald Heathmore: 892.345.3428 436 Finley Avenue ... Ronald Heathmore: 892.345.3428 436 Finley Avenue
... Frank Burger: 925.541.7625 662 South Dogwood Way ... Frank Burger: 925.541.7625 662 South Dogwood Way
@ -1137,7 +1137,7 @@ into a list with each nonempty line having its own entry:
.. doctest:: .. doctest::
:options: +NORMALIZE_WHITESPACE :options: +NORMALIZE_WHITESPACE
>>> entries = re.split("\n+", input) >>> entries = re.split("\n+", text)
>>> entries >>> entries
['Ross McFluff: 834.345.1254 155 Elm Street', ['Ross McFluff: 834.345.1254 155 Elm Street',
'Ronald Heathmore: 892.345.3428 436 Finley Avenue', 'Ronald Heathmore: 892.345.3428 436 Finley Avenue',