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.
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 @@
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 @@
>>> 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])