mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
#3669 from Robert Lehmann: simplify use of iterator in example
This commit is contained in:
parent
873c9f15d0
commit
cd52023e6f
1 changed files with 1 additions and 1 deletions
|
@ -424,7 +424,7 @@ A :class:`Connection` instance has the following attributes and methods:
|
|||
import sqlite3, os
|
||||
|
||||
con = sqlite3.connect('existing_db.db')
|
||||
full_dump = os.linesep.join([line for line in con.iterdump()])
|
||||
full_dump = os.linesep.join(con.iterdump())
|
||||
f = open('dump.sql', 'w')
|
||||
f.writelines(full_dump)
|
||||
f.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue