summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-15 15:53:58 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-15 15:53:58 (GMT)
commita8bcf80e7bde79c722d4cb76ded118d9dd0ffbca (patch)
tree76ccbbf9824a98598644f5566ae07352d82311a0 /Misc/NEWS
parent1c917072ca2895a196de7f397d4e96bcc577e13d (diff)
downloadcpython-a8bcf80e7bde79c722d4cb76ded118d9dd0ffbca.zip
cpython-a8bcf80e7bde79c722d4cb76ded118d9dd0ffbca.tar.gz
cpython-a8bcf80e7bde79c722d4cb76ded118d9dd0ffbca.tar.bz2
Note about fix in list comprehensions.
Diffstat (limited to 'Misc/NEWS')
-rw-r--r--Misc/NEWS9
1 files changed, 9 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 5c411f9..b10f440 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,15 @@ Type/class unification and new-style classes
Core
+- A very subtle syntactical pitfall in list comprehensions was fixed.
+ For example: [a+b for a in 'abc', for b in 'def']. The comma in
+ this example is a mistake. Previously, this would silently let 'a'
+ iterate over the singleton tuple ('abc',), yielding ['abcd', 'abce',
+ 'abcf'] rather than the intended ['ad', 'ae', 'af', 'bd', 'be',
+ 'bf', 'cd', 'ce', 'cf']. Now, this is flagged as a syntax error.
+ Note that [a for a in <singleton>] is a convoluted way to say
+ [<singleton>] anyway, so it's not like any expressiveness is lost.
+
- binascii has now two quopri support functions, a2b_qp and b2a_qp.
- readline now supports setting the startup_hook and the pre_event_hook.