[Python-ideas] Augmented assignment syntax for objects.

Paul Moore p.f.moore at gmail.com
Wed Apr 26 17:28:20 EDT 2017


On 26 April 2017 at 21:51, Erik <python at lucidity.plus.com> wrote:
> It doesn't make anything more efficient, however all of the suggestions of
> how to do it with current syntax (mostly decorators) _do_ make things less
> efficient.

Is instance creation the performance bottleneck in your application?
That seems unusual. I guess it's possible if you're reading a large
database file and creating objects for each row. But in that case, as
Chris A says, you may be better with something like a named tuple. In
any case, optimising for performance is not what generic solutions are
good at, so it's not surprising that a generic decorator involves a
performance hit.

Paul


More information about the Python-ideas mailing list