private

- c o v e n t r y - coventry at removethisandallhyphens-o-n-e.net
Mon Jul 1 00:32:25 EDT 2002


>>Kind of off-topic, but this got me curious. The only way I 
>>could think of is to assume (which I think is always true) 
>>that the private data members are in order from the starting 
>>address so based on the offset from the address of the object 
>>you could access each one.
>>
> 
> .. and of course #define private public, or just go in and edit the .h
> file...

True, but you could edit gcc to allow access to private members of a C++ 
class, could you not?  Hrm, this issue probably isn't whether it is 
possible to hack around an implementation of 'private', but more about
having a real 'private' type/functionality.  Right now, we hack to put
simulate private - why not make other hack to work around it?

-c




More information about the Python-list mailing list