[Python-checkins] r73214 - in python/branches/py3k: Doc/whatsnew/2.6.rst Lib/test/test_with.py Lib/traceback.py
georg.brandl
python-checkins at python.org
Thu Jun 4 12:21:10 CEST 2009
Author: georg.brandl
Date: Thu Jun 4 12:21:10 2009
New Revision: 73214
Log:
Merged revisions 73186,73206,73212 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73186 | georg.brandl | 2009-06-03 23:21:09 +0200 (Mi, 03 Jun 2009) | 1 line
#6174: fix indentation in code example.
........
r73206 | georg.brandl | 2009-06-04 11:15:12 +0200 (Do, 04 Jun 2009) | 1 line
#3584: ignore trailing newlines when placing the caret for a SyntaxError location.
........
r73212 | georg.brandl | 2009-06-04 12:10:41 +0200 (Do, 04 Jun 2009) | 1 line
Better name for "Ctor".
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Doc/whatsnew/2.6.rst
python/branches/py3k/Lib/test/test_with.py
python/branches/py3k/Lib/traceback.py
Modified: python/branches/py3k/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/2.6.rst (original)
+++ python/branches/py3k/Doc/whatsnew/2.6.rst Thu Jun 4 12:21:10 2009
@@ -682,15 +682,15 @@
for N in range(1, 1000, 10):
p.apply_async(factorial, (N, d))
- # Mark pool as closed -- no more tasks can be added.
- p.close()
+ # Mark pool as closed -- no more tasks can be added.
+ p.close()
- # Wait for tasks to exit
- p.join()
+ # Wait for tasks to exit
+ p.join()
- # Output results
- for k, v in sorted(d.items()):
- print k, v
+ # Output results
+ for k, v in sorted(d.items()):
+ print k, v
This will produce the output::
Modified: python/branches/py3k/Lib/test/test_with.py
==============================================================================
--- python/branches/py3k/Lib/test/test_with.py (original)
+++ python/branches/py3k/Lib/test/test_with.py Thu Jun 4 12:21:10 2009
@@ -677,7 +677,7 @@
if self.gobble:
return True
- class CtorRaises(object):
+ class InitRaises(object):
def __init__(self): raise RuntimeError()
class EnterRaises(object):
@@ -697,7 +697,7 @@
def testExceptionInExprList(self):
try:
- with self.Dummy() as a, self.CtorRaises():
+ with self.Dummy() as a, self.InitRaises():
pass
except:
pass
Modified: python/branches/py3k/Lib/traceback.py
==============================================================================
--- python/branches/py3k/Lib/traceback.py (original)
+++ python/branches/py3k/Lib/traceback.py Thu Jun 4 12:21:10 2009
@@ -225,7 +225,7 @@
if badline is not None:
lines.append(' %s\n' % badline.strip())
if offset is not None:
- caretspace = badline[:offset].lstrip()
+ caretspace = badline.rstrip('\n')[:offset].lstrip()
# non-space whitespace (likes tabs) must be kept for alignment
caretspace = ((c.isspace() and c or ' ') for c in caretspace)
# only three spaces to account for offset1 == pos 0
More information about the Python-checkins
mailing list