Which objects are expanded by double-star ** operator?

2010-06-07 Thread kkumer
I have to merge two dictionaries into one, and in a "shallow" way: changing items should be possible by operating either on two parents or on a new dictionary. I am open to suggestions how to do this (values are always numbers, BTW), but I tried to do it by creating a dict-like class that just for

Re: Which objects are expanded by double-star ** operator?

2010-06-08 Thread kkumer
(sorry for posting empty post by accident) Peter Otten <__pete...@web.de> wrote: > it stops working -- probably a side-effect of some optimization. > So if you change your hubDict's base class from dict to object you should > get the desired behaviour. Yes, as already noted, this would require p

Re: Which objects are expanded by double-star ** operator?

2010-06-08 Thread kkumer
Bryan wrote: > I get the same bug-like behavior in 3.1. I think Peter is right that > it's probably a side-effect of an optimization. kkumer seems to have > completely over-ridden the methods of dict, but if we insert into his > hubDict with the parent class's method: >