On Wed, Jul 9, 2008 at 9:38 PM, John Fouhy <[EMAIL PROTECTED]> wrote: > On 10/07/2008, Kent Johnson <[EMAIL PROTECTED]> wrote: >> The actual formal syntax definitions for the two are slightly different: >> http://docs.python.org/ref/lists.html >> http://docs.python.org/ref/genexpr.html
> Is the generator expression grammar right? How do I parse, e.g., > '(x+1 for x in range(10))'? Seems like there's nothing there for > 'range(10)'. Like it should replace 'or_test' with 'old_expression'. I can't figure out how to parse that either, as a gen exp or a list comp. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor