On 24/04/2018 02:42, Chris Jerdonek wrote: > On Mon, Apr 23, 2018 at 4:54 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote: >> Tim Peters wrote: >>> if (diff := x - x_base) and (g := gcd(diff, n)) > 1: >>> return g >> My problem with this is -- how do you read such code out loud? > It could be... > > "if diff, which we define as x - x_base, and g, which ....." etc. > That's good. It also makes it natural to expect only a simple name. One can "define" a name, but assignment to a complex left-side expression is not definition (binding). Jeff Allen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180424/1f54a4f0/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4