Bugs item #1071248, was opened at 2004-11-22 20:26 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1071248&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Python 2.4 >Status: Closed >Resolution: Later Priority: 5 Submitted By: Lenard Lindstrom (kermode) Assigned to: Jeremy Hylton (jhylton) Summary: Documented grammar for List displays incorrect (testlist) Initial Comment: In section 5.2.4 of the Python Reference Manual for Pythons 2.4 and 2.3 the definition testlist ::= test ( "," test )* [ "," ] should be testlist ::= test [ ( "," test )+ [ "," ] ] to conform with the definition of testlist_safe in the Grammar definition file. In other words, a trailing comma is not permitted if there is only one test in testlist. ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2006-07-30 11:02 Message: Logged In: YES user_id=849994 This is subsumed by patch #1489771. ---------------------------------------------------------------------- Comment By: Lenard Lindstrom (kermode) Date: 2004-12-17 00:00 Message: Logged In: YES user_id=663274 Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> [x for x in 1,] File "<stdin>", line 1 [x for x in 1,] ^ SyntaxError: invalid syntax >>> [x for x in 1,2,] [1, 2] >>> for x in 1,: ... print x ... 1 >>> ---------------------------------------------------------------------- Comment By: engelbert gruber (grubert) Date: 2004-12-15 08:50 Message: Logged In: YES user_id=147070 but >>> testlist = 1, >>> testlist (1,) so testlist = 1 does not produce a list testlist ::= one "," ( another "," )* [and [","]] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1071248&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com