Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simplify ring.builder.RingBuilder.__deepcopy__

Only container classes (lists, sets, dicts, graphs, collections,
etc) need to track objects they deepcopy in the memo dict -
particularly when they may contain other containers!  As they
recreate a new container with the same items as themselves, they'll
reference the memo for each item they contain before making a
deepcopy of it, and place a reference to the copied item into memo
after they do.  Trying to help out some other container class in
this endeavor by attempting to add ourselves to the memo dict in
some useful manor on their behalf however; is not helpful.

All we need to do to make sure we're being a good __deepcopy__
implementation is make sure we pass on memo to our calls of deepcopy
so that other container classes can avoid making additional
deepcopy's of our containers if they already have a memorized copy
(which would be odd since unique instances of RingBuilders aren't
expected to share state, but hey - python doesn't have private
attributes so you never know!)

Change-Id: Ifac444dffbf79d650b2d858f6282e05d8ea741a0
latest commit 03380380ef
@clayg clayg authored
Something went wrong with that request. Please try again.