On Mon, 2018-01-15 at 20:27 +0000, Igor Shirkalin via Digitalmars-d- learn wrote: > On Monday, 15 January 2018 at 19:05:52 UTC, xenon325 wrote: > > A workmate has recently shown this piece of code to show how > > nice Python is (we are mostly C and growing C++ shop): > > dd = [dict(_name=k, **{a + str(i): aget(d, k, a) for a in > > aa for i, d in enumerate([srv1, srv2])}) for k in sorted(kk)] > > This is the most terrible Python code I have ever seen. > If you know Python, could you please unroll to more readable form?
Actually I have seen worse, but… I think the way this Python code is presented is fairly dreadful. I am fiddling with trying to provide a better version. If people are interested in this I can share in a while when it's ready. -- Russel. =========================================== Dr Russel Winder t: +44 20 7585 2200 41 Buckmaster Road m: +44 7770 465 077 London SW11 1EN, UK w: www.russel.org.uk
signature.asc
Description: This is a digitally signed message part