diff options
| author | Guido van Rossum <guido@python.org> | 2007-08-31 03:25:11 (GMT) |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2007-08-31 03:25:11 (GMT) |
| commit | 0616b792ba4115fe3bb79c446c2c6383db434490 (patch) | |
| tree | 5a6c2a06d6c8aa125c0fb4fcb278020b6c585e12 /Doc/tutorial/stdlib2.rst | |
| parent | 8b2af27dae7c80218c9912052ac1b4c6144ce746 (diff) | |
| download | cpython-0616b792ba4115fe3bb79c446c2c6383db434490.zip cpython-0616b792ba4115fe3bb79c446c2c6383db434490.tar.gz cpython-0616b792ba4115fe3bb79c446c2c6383db434490.tar.bz2 | |
Tutorial update for 3.0 by Paul Dubois.
I had to fix a few markup issues in controlflow.rst and modules.rst.
There's a unicode issue on line 448 in introduction.rst that someone else needs to fix.
Diffstat (limited to 'Doc/tutorial/stdlib2.rst')
| -rw-r--r-- | Doc/tutorial/stdlib2.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst index 0ce2757..bd1a225 100644 --- a/Doc/tutorial/stdlib2.rst +++ b/Doc/tutorial/stdlib2.rst @@ -184,14 +184,14 @@ tasks in background while the main program continues to run:: f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED) f.write(self.infile) f.close() - print 'Finished background zip of: ', self.infile + print('Finished background zip of: ', self.infile) background = AsyncZip('mydata.txt', 'myarchive.zip') background.start() - print 'The main program continues to run in foreground.' + print('The main program continues to run in foreground.') background.join() # Wait for the background task to finish - print 'Main program waited until background was done.' + print('Main program waited until background was done.') The principal challenge of multi-threaded applications is coordinating threads that share data or other resources. To that end, the threading module provides @@ -309,7 +309,7 @@ tree searches:: >>> from collections import deque >>> d = deque(["task1", "task2", "task3"]) >>> d.append("task4") - >>> print "Handling", d.popleft() + >>> print("Handling", d.popleft()) Handling task1 unsearched = deque([starting_node]) |
