[Python-ideas] Reduce/fold and scan with generator expressions and comprehensions

Steven D'Aprano steve at pearwood.info
Mon Nov 7 00:31:29 EST 2016


On Mon, Nov 07, 2016 at 02:21:04AM -0200, Danilo J. S. Bellini wrote:
> 2016-11-06 23:55 GMT-02:00 Steven D'Aprano <steve at pearwood.info>:
> 
> > On Sun, Nov 06, 2016 at 04:46:42PM -0200, Danilo J. S. Bellini wrote:
> >
> > > 1.2. Sub-expressions in an expression might be on other statements (e.g.
> > > assignments, other functions).
> >
> > Not in Python it can't be. Assignment is not an expression, you cannot
> > say (x = 2) + 1.
> >
> 
> O.o ... how is that (x = 2) + 1 related to what I wrote?

I misread your comment as "Sub-expressions in an expression might be 
other statements".


Sorry for the misunderstanding.


-- 
Steve


More information about the Python-ideas mailing list