Heh that could make sense, but that definitely was not my mental model of how python binds variables! Definitely is not how Scala works.
On Wed, Jan 20, 2021 at 10:00 AM Marco Wong <mck...@gmail.com> wrote: > Hmm, I think I got what Jingnan means. The lambda function is x != i and i > is not evaluated when the lambda function was defined. So the pipelined rdd > is rdd.filter(lambda x: x != i).filter(lambda x: x != i), rather than > having the values of i substituted. Does that make sense to you, Sean? > >>