> The reason for this problem is that we are busy re-structuring a large Python
> program, and we want to ensure nobody is messing up our data structures (at
> least not until we are finished).
python-egenix-mxproxy (Debian package name) may be useful.
http://www.egenix.com/products/python/mxBase
"A.T.Hofkamp" <[EMAIL PROTECTED]> writes:
[...]
> I can derive from dict, but the problem with that is that I start with a
> read/write dictionary, and I can only hope to plug all holes to prevent my
> data
> from leaking out.
> By starting from 'object', I certainly don't have that problem, I sta
On 2007-09-19, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> A.T.Hofkamp a écrit :
>> So if copying all methods of a native dictionary is not enough, what should I
>> do to make my class work as a dictionary WITHOUT deriving from dict (which
>> will
>> obviously work).
>>
Hello all,
Thanks fo
On Wed, 19 Sep 2007 21:43:59 +0200, Bruno Desthuilliers wrote:
>> So if copying all methods of a native dictionary is not enough, what
>> should I do to make my class work as a dictionary WITHOUT deriving from
>> dict (which will obviously work).
>>
>>
> Sorry, I missed this last requirement. BT
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
(snip)
> So if copying all methods of a native dictionary is not enough, what should I
> do to make my class work as a
Bruno Desthuilliers a écrit :
> A.T.Hofkamp a écrit :
>
(snip)
>> # Below is produced with
>> # print '\n'.join(['self.%s = self.mydict.%s' % (v,v)
>> # for v in dir(dict)])
>> # commented-out functions done by hand
>> #
>> #self.__class__ =
Steve Holden a écrit :
> A.T.Hofkamp wrote:
>
(snip)
>> So if copying all methods of a native dictionary is not enough, what
>> should I
>> do to make my class work as a dictionary WITHOUT deriving from dict
>> (which will
>> obviously work).
>>
> You have to overwrite the "__new__" method to r
A.T.Hofkamp a écrit :
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
> Below is a brute-force experiment that cannot deal with "x in obj", plz read
> the explanation below the code:
>
A.T.Hofkamp wrote:
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
> Below is a brute-force experiment that cannot deal with "x in obj", plz read
> the explanation below the code:
> --
A.T.Hofkamp wrote:
> Hello all,
>
> This morning I tried to create my own read-only dictionary, and failed
> miserably.
> I don't understand why, can somebody enlighten me?
>
> Below is a brute-force experiment that cannot deal with "x in obj", plz read
> the explanation below the code:
> ---
Hello all,
This morning I tried to create my own read-only dictionary, and failed
miserably.
I don't understand why, can somebody enlighten me?
Below is a brute-force experiment that cannot deal with "x in obj", plz read
the explanation below the code:
class myown
11 matches
Mail list logo