A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-April/152899.html below:

[Python-Dev] PEP 572: Assignment Expressions

[Python-Dev] PEP 572: Assignment Expressions [Python-Dev] PEP 572: Assignment ExpressionsSven R. Kunze srkunze at mail.de
Mon Apr 23 16:35:39 EDT 2018
On 23.04.2018 19:31, Tim Peters wrote:
> Surely you're joking.  This is math.gcd(), which is expensive for
> multi-thousand bit integers, and the interpreter knows nothing about
> it.  Adding a cache of _any_ kind (LRU or otherwise) would make it
> even slower.
Alright, if that problem is just about performance, then there must be a 
better way to resolve it rather than inventing a new syntax. Btw. 
storing the result in a local var is also a cache IMHO. And if gcd is 
immutable, I think Python can do a great job here of optimizing.

Anyway, your example is the best one I've seen so far.

More information about the Python-Dev mailing list

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