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
..
2000-05-02 18:34:30 +00:00
2001-07-26 13:41:06 +00:00
2001-10-07 20:54:12 +00:00
2001-10-13 06:11:28 +00:00
2000-09-26 05:46:01 +00:00
2001-10-15 15:44:05 +00:00
2000-07-22 18:47:25 +00:00
2000-09-04 00:54:56 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-01-19 23:34:06 +00:00
2001-08-11 21:54:11 +00:00
2000-09-01 23:29:29 +00:00
2001-09-05 14:24:43 +00:00
2000-09-01 23:29:29 +00:00
2001-05-09 00:50:59 +00:00
2001-10-02 21:32:07 +00:00
2001-10-05 21:50:08 +00:00
2001-07-26 13:41:06 +00:00
2000-09-01 23:29:29 +00:00
2001-07-23 16:30:27 +00:00
2001-08-20 20:32:33 +00:00
2001-10-11 14:40:37 +00:00
2000-09-05 04:40:39 +00:00
2001-04-12 20:53:31 +00:00
2000-09-01 23:29:29 +00:00
2001-07-26 13:41:06 +00:00
2000-11-03 08:18:37 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-10-15 15:44:05 +00:00
2001-07-26 13:41:06 +00:00
2001-10-04 14:52:06 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-09-10 22:00:39 +00:00
2001-08-30 14:50:20 +00:00
2000-09-01 23:29:29 +00:00
2001-08-17 18:39:25 +00:00
2001-07-31 22:10:29 +00:00
2000-09-01 23:29:29 +00:00
2001-07-26 13:41:06 +00:00
2001-07-19 12:19:27 +00:00
2001-10-12 22:17:56 +00:00
2000-09-01 23:29:29 +00:00
2000-07-22 18:47:25 +00:00
2000-09-01 23:29:29 +00:00
2001-07-26 13:41:06 +00:00
2001-09-20 20:46:19 +00:00
2001-09-20 20:46:19 +00:00
2001-10-04 14:48:42 +00:00
2000-09-01 23:29:29 +00:00
2000-11-13 19:45:45 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-08-29 21:37:10 +00:00
2000-09-01 23:29:29 +00:00
2000-10-12 20:58:32 +00:00
2001-10-15 14:34:42 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-07-26 21:34:59 +00:00
2000-09-01 23:29:29 +00:00