Re: [Python-ideas] Multi Statement Lambdas

2018-10-21 Thread Ron Reiter
Multi-line lambdas may be nice for functional languages, but Python is very imperative in nature and prefers clean syntax over conciseness, which means it will make it REALLY hard to fit with Python. I personally find multi-line lambdas an unreadable abomination. As for some more concrete reasons

Re: [Python-ideas] Multi Statement Lambdas

2018-10-21 Thread Ron Reiter
Spark > and Scala, it was easy to script a longer chain of transformations in > Scala. Does anybody know how that works in Python without multiline lambdas? > > Cheers Marko > > > Le dim. 21 oct. 2018 à 18:40, Ron Reiter a écrit : > >> Multi-line lambdas may be ni

[Python-ideas] gevent-like Coroutines in Python

2018-10-30 Thread Ron Reiter
One of Golang's advantages is that goroutines act like gevent's coroutines instead of relying on an async/await syntax. In my opinion, it makes Golang code much more readable. I feel like having the await syntax trigger by default on any awaitable invocation in a coroutine context makes much more

Re: [Python-ideas] gevent-like Coroutines in Python

2018-10-30 Thread Ron Reiter
er> On Tue, Oct 30, 2018 at 12:41 PM Chris Angelico wrote: > On Tue, Oct 30, 2018 at 6:01 PM Ron Reiter wrote: > > > > ... most developers would always mean they prefer to do this: > > > > result = [await fun(x) for fun in funcs] > > > > versus: > &g

Re: [Python-ideas] Add "default" kwarg to list.pop()

2018-10-31 Thread Ron Reiter
I think l.pop() if l else None is good enough. I think it's pretty obvious that a developer means "Pop the list if the list is not empty, and return None if the list is empty ". - Ron [image: Facebook] [image: Twitter] [image