[Python-Dev] PEP 572: Assignment Expressions
Sven R. Kunze
srkunze at mail.de
Mon Apr 23 16:35:39 EDT 2018
More information about the Python-Dev mailing list
Mon Apr 23 16:35:39 EDT 2018
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list