[C++-sig] shared_ptr object identity

2010-08-15 Thread Erlend Cleveland
Hi all, I've been bashing my head against a wall for the past couple of days trying to figure this out. It's frustrating because it seems like it should be such a simple thing. I've also read through every archived message I can find relating to this topic, but just can't seem to pull it all toget

Re: [C++-sig] shared_ptr object identity

2010-08-15 Thread Erlend Cleveland
>> I've been bashing my head against a wall for the past couple of days > >> trying to figure this out. It's frustrating because it seems like it >> should be such a simple thing. > > I cannot be so simple if you think of the C++ side as being unaware of > the Python layer. Each time the C++ functi

Re: [C++-sig] shared_ptr object identity

2010-08-16 Thread Erlend Cleveland
> Do I understand correctly that you want to use the object essentially like > a dictionary, just with obj.key instead of obj["key"]? > I consider this bad practice, since it isn't obvious to readers of your > code. Yes, you make a good point here, and it has made me question the use cases that I