[Python-Dev] RE: [Python-checkins] python/nondist/peps pep-0323.txt, NONE, 1.1 pep-0000.txt, 1.254, 1.255

Guido van Rossum guido at python.org
Mon Oct 27 19:54:21 EST 2003


> Also, I have a question about the semantic specification of what a copy
> is supposed to do.  Does it guarantee that the same data stream will be
> reproduced?  For instance, would a generator of random words expect its
> copy to generate the same word sequence.  Or, would a copy of a
> dictionary iterator change its output if the underlying dictionary got
> updated (i.e. should the dict be frozen to changes when a copy exists or
> should it mutate).

Every attempt should be made for the two copies to return exactly the
same stream of values.  This is the pure tee() semantics.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list