Re: [Python-ideas] Pre-conditions and post-conditions

2018-08-25 Thread Marko Ristin-Kaufmann
Hi, @Paul Moore: thanks for pointing out that many people are not familiar with design-by-contract. I was not aware of that. Let me give you a very short introduction into contracts and what they are good for. I'll review some existing libraries and highlight what features we missed (and why we d

[Python-ideas] Unpacking iterables for augmented assignment

2018-08-25 Thread James Lu
I propose we apply PEP 3132 to PEP 203. That is, for every statement where " = " is valid I propose "lhs += rhs" should also be valid. Simple example: a = 0 b = 0 a, b += 1, 2 # a is now 1 # b is now 2 ___ Python-ideas mailing list [email protected]

Re: [Python-ideas] Unpacking iterables for augmented assignment

2018-08-25 Thread Jonathan Fine
Hi James Thank you for the simple example. It makes discussing your proposal much easier. I hope you don't mind, I'll modify it a little to make the semantics clearer, at least to me. Here it is. init = (10, 20) incr = (1, 2) (a, b) = init # Now, (a, b) == (10, 20) a, b += incr # Now (a, b) ==