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/2014-June/134840.html below:

[Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes

[Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classesGreg Ewing greg.ewing at canterbury.ac.nz
Fri Jun 6 04:26:35 CEST 2014
Nathaniel Smith wrote:

> I'd be a 
> little nervous about whether anyone has implemented, say, an iadd with 
> side effects such that you can tell whether a copy was made, even if the 
> object being copied is immediately destroyed.

I can think of at least one plausible scenario where
this could occur: the operand is a view object that
wraps another object, and its __iadd__ method updates
that other object.

In fact, now that I think about it, exactly this
kind of thing happens in numpy when you slice an
array!

So the opt-in indicator would need to be dynamic, on
a per-object basis, rather than a type flag.

-- 
Greg
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