Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-11 Thread Crutcher Dunnavant
Is there any objection to this patch? Any support? On 1/10/06, Crutcher Dunnavant [EMAIL PROTECTED] wrote: 1402289 On 1/10/06, Aahz [EMAIL PROTECTED] wrote: On Tue, Jan 10, 2006, Crutcher Dunnavant wrote: There is an inconsistancy in the way that dictionary subclasses behave when

[Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
There is an inconsistancy in the way that dictionary subclasses behave when they are used as as namespaces in execs. Basically, while python 2.4 permits the usage of dictionary subclasses for local environments, it still bypasses the subclass functions and uses the C API for global environments.

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Aahz
On Tue, Jan 10, 2006, Crutcher Dunnavant wrote: There is an inconsistancy in the way that dictionary subclasses behave when they are used as as namespaces in execs. Basically, while python 2.4 permits the usage of dictionary subclasses for local environments, it still bypasses the subclass

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
1402289 On 1/10/06, Aahz [EMAIL PROTECTED] wrote: On Tue, Jan 10, 2006, Crutcher Dunnavant wrote: There is an inconsistancy in the way that dictionary subclasses behave when they are used as as namespaces in execs. Basically, while python 2.4 permits the usage of dictionary subclasses

Re: [Python-Dev] [PATCH] Fix dictionary subclass semantics when used as global dictionaries

2006-01-10 Thread Crutcher Dunnavant
This is the unittest that checks it. On trunk, the global and fall through cases will fail, but they pass with the patch. import unittest from test import test_support class DictSubclass(dict): get_notify_func = None def __getitem__(self, key): if self.get_notify_func: