Guido van Rossum
1c917072ca
Very subtle syntax change: in a list comprehension, the testlist in
...
"for <var> in <testlist> may no longer be a single test followed by
a comma. This solves SF bug #431886 . Note that if the testlist
contains more than one test, a trailing comma is still allowed, for
maximum backward compatibility; but this example is not:
[(x, y) for x in range(10), for y in range(10)]
^
The fix involved creating a new nonterminal 'testlist_safe' whose
definition doesn't allow the trailing comma if there's only one test:
testlist_safe: test [(',' test)+ [',']]
2001-10-15 15:44:05 +00:00
..
2001-09-08 04:00:12 +00:00
2001-01-25 20:04:14 +00:00
2001-08-02 04:15:00 +00:00
2001-09-05 22:52:50 +00:00
2001-08-10 21:38:04 +00:00
2001-09-12 19:12:49 +00:00
2001-06-09 07:59:43 +00:00
2001-10-03 12:09:30 +00:00
2001-08-10 20:28:28 +00:00
2001-08-02 04:15:00 +00:00
2001-09-13 05:38:56 +00:00
2001-09-10 21:28:20 +00:00
2001-08-29 23:45:25 +00:00
2001-08-02 04:15:00 +00:00
2001-10-15 15:44:05 +00:00
2001-09-10 20:52:51 +00:00
2001-04-23 14:08:49 +00:00
2001-10-05 20:41:38 +00:00
2001-09-10 20:52:51 +00:00
2001-09-10 20:52:51 +00:00
2001-01-28 00:27:39 +00:00
2001-08-12 21:52:24 +00:00
2001-08-02 04:15:00 +00:00
2001-09-13 05:38:56 +00:00
2001-10-08 15:18:27 +00:00
2001-10-11 18:31:31 +00:00
2001-08-08 05:00:18 +00:00
2001-03-02 06:10:17 +00:00
2001-07-16 05:37:24 +00:00
2001-09-28 17:15:23 +00:00
2001-07-26 21:34:59 +00:00
2001-10-13 09:12:41 +00:00
2001-08-31 17:40:15 +00:00
2001-10-05 21:50:08 +00:00
2001-09-10 22:09:30 +00:00
2001-07-26 21:34:59 +00:00
2001-10-01 19:50:06 +00:00
2001-07-19 12:19:27 +00:00
2001-10-05 21:55:19 +00:00
2001-08-31 17:40:15 +00:00
2001-07-09 12:30:54 +00:00
2001-09-11 01:41:59 +00:00
2001-09-20 20:46:19 +00:00
2001-08-11 21:51:24 +00:00
2001-08-08 05:00:18 +00:00
2001-09-10 23:37:46 +00:00
2001-01-19 09:45:02 +00:00
2001-09-20 10:35:46 +00:00
2001-10-05 22:06:45 +00:00