[Python-checkins] python/dist/src/Lib pickle.py,1.91,1.92

Tim Peters tim.one@comcast.net
Mon, 27 Jan 2003 22:33:27 -0500


[Neal Norwitz, on save_dict() rewrite]
> In the case where self.bin and len(object) == 1, the code looks
> like it does something different.
>
> The old code would save(key) & save(value) since the for loop is
> executed.  The new code doesn't execute the loop though.
>
> Am I missing something?

Guido explained this already.  It makes me wonder whether I shouldn't
duplicate that block of code, though -- the point of these rewrites was
largely to make the code more evident, by eliminating mounds of fiddly
little "internal" branches.  I originally did duplicate the loop, but it was
such blatant code duplication then that I nuked the first copy and let it
fall thru instead.

IOW, I can't win this one <wink>.