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 [EMAIL PROTECTED] _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com