Greg Ewing wrote: > Nick Coghlan wrote: > >> The former seems fairly pointless, and the latter difficult (since it has >> implications for moving the data store when the array gets resized). > > I don't see why that should be a serious problem, as > long as it's understood that the address reported by > the array interface is only for temporary use. > > I also don't see what relevance the semantics of > Python indexing or mutation has. The array interface > should just report the location and shape of the > data as it happens to be when the call is made. > What happens to it in between times is entirely > up to the object. But it might be nice to be able to determine if the object has a way of promising a constant address while a reference is held. The array.array implementation could simply say, "nope." I certainly have use for implementations that can give better guarantees, and I'd like to be able to distinguish the two. --Scott David Daniels Scott.Daniels at Acm.Org
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