set and dict iteration

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Sep 3 21:59:16 EDT 2012


On Mon, 03 Sep 2012 21:50:57 -0400, Dave Angel wrote:

> On 09/03/2012 09:26 PM, Steven D'Aprano wrote:

>> An unsigned C int can count up to 4,294,967,295. I propose that you say
>> that is enough iterators for anyone, and use a single, simple, version
>> counter in the dict and the iterator. If somebody exceeds that many
>> iterators to a single dict or set,
> 
> I think you have the count confused.  it has to be a count of how many
> changes have been made to the dict or set, not how many iterators exist.

Oops, yes you are absolutely right. It's a version number, not a count of 
iterators.


-- 
Steven



More information about the Python-list mailing list