[Python-Dev] decimal.Context.copy() shallow or deep?

Batista, Facundo FBatista at uniFON.com.ar
Mon Aug 9 15:48:50 CEST 2004


[Raymond Hettinger]

#- > > Do you guys think it should be left alone (shallow) or 
#- changed (made
#- > > deep)?
#- > 
#- > A user-visible copy certainly should not share mutable 
#- state with the
#- > original. 
#- 
#- I was afraid of that.  What a PITA.

My opinion is that the important step here is to fix the behaviour before
alpha-3 or beta (whatever cames first).

So, it's nice your idea to rename context.copy() to context._shallow_copy(),
make context.copy() deep, and then, in all the tests that fail, change copy
for the shallow one.

Later, we'll have time to maybe fix that and don't depend of a shallow copy
(work around that WorkRep would be nice also).

.	Facundo


More information about the Python-Dev mailing list

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant