class derived from dict in eval
Jp Calderone
exarkun at intarweb.us
Mon Feb 24 16:38:41 EST 2003
On Mon, Feb 24, 2003 at 02:47:32PM +0100, Florian Schulze wrote:
> Hi!
>
> I want to use my own class which is derived from dict as locals in the eval
> function, but I can't get it to work. My class calculates values dependant
> on the key. Is this possible at all, or am I at a dead end here? If it's
> possible, then please tell me which methods I have to implement.
>
This won't work, Python bypasses the mapping protocol and access dict
items directly.
Jp
--
"One World, one Web, one Program." - Microsoft(R) promotional ad
"Ein Volk, ein Reich, ein Fuhrer." - Adolf Hitler
--
up 16 days, 2:29, 5 users, load average: 0.00, 0.03, 0.05
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030224/eca33d4f/attachment.sig>
More information about the Python-list
mailing list