[Python-ideas] Re: Conditional dict declarations

2019-09-07 Thread Chris Angelico
On Sat, Sep 7, 2019 at 11:27 PM Rob Cliffe via Python-ideas wrote: > A chance for me to bang the drum on one of my pet themes: > Sometimes the readability of code is improved by breaking the sacred > taboo of 1 statement per line, if it allows similar constructs to be > vertically aligned: > >

[Python-ideas] Re: [OT] Designing for Concurrency (was: Add a "block" option to Executor.submit)

2019-09-07 Thread Barry Scott
> On 5 Sep 2019, at 20:43, Andrew Barnert wrote: > > Have you actually needed case 3 with Executor, or only with other kinds of > async models? With other kinds of async. I mention it as this looks like a design pattern for this problem space. Barry

[Python-ideas] Re: Conditional dict declarations

2019-09-07 Thread Joao S. O. Bueno
On Sat, 7 Sep 2019 at 01:24, Steven D'Aprano wrote: > On Sat, Sep 07, 2019 at 12:35:09AM -0300, Joao S. O. Bueno wrote: > > > Well - the idea showed up here, and got an immediate "that is nice, let's > > do it" from you, followed by approval from a lot more people, and > > very little controverse

[Python-ideas] Re: Conditional dict declarations

2019-09-07 Thread Rob Cliffe via Python-ideas
On 04/09/2019 23:25:32, r...@hwyl.org wrote: Hi list I have a proposal for a minor (improvement?) to dict declarations. I find a common requirement I have is to include one or more entries in a dict only if some condition is met. Currently, the usual way of doing that is to add one or more