mirror of https://github.com/python/cpython
#3669 from Robert Lehmann: simplify use of iterator in example
This commit is contained in:
parent
873c9f15d0
commit
cd52023e6f
|
@ -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…
Reference in New Issue