mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Remove all definitions of raw_input() that were still scattered throughout the docs
from the time where there was neither input() nor raw_input().
This commit is contained in:
parent
2b1c592d22
commit
8d5c39240e
6 changed files with 8 additions and 37 deletions
|
@ -104,16 +104,11 @@ Template subclasses can specify a custom delimiter. For example, a batch
|
|||
renaming utility for a photo browser may elect to use percent signs for
|
||||
placeholders such as the current date, image sequence number, or file format::
|
||||
|
||||
>>> import time, os.path, sys
|
||||
>>> def raw_input(prompt):
|
||||
... sys.stdout.write(prompt)
|
||||
... sys.stdout.flush()
|
||||
... return sys.stdin.readline()
|
||||
...
|
||||
>>> import time, os.path
|
||||
>>> photofiles = ['img_1074.jpg', 'img_1076.jpg', 'img_1077.jpg']
|
||||
>>> class BatchRename(Template):
|
||||
... delimiter = '%'
|
||||
>>> fmt = raw_input('Enter rename style (%d-date %n-seqnum %f-format): ')
|
||||
>>> fmt = input('Enter rename style (%d-date %n-seqnum %f-format): ')
|
||||
Enter rename style (%d-date %n-seqnum %f-format): Ashley_%n%f
|
||||
|
||||
>>> t = BatchRename(fmt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue