[issue23113] Compiler doesn't recognize qualified exec('', {})

2014-12-25 Thread John Firestone
John Firestone added the comment: Sorry. Duplicates 21591 -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue23113> ___ ___ Python-

[issue23113] Compiler doesn't recognize qualified exec('', {})

2014-12-25 Thread John Firestone
New submission from John Firestone: Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def outer(): ...

[issue15099] exec of function doesn't call __getitem__ or __missing__ on undefined global

2012-06-18 Thread John Firestone
John Firestone added the comment: Thank you all for the quick and interesting responses! Here is another example, this time showing a simple s sometimes behaves like globals()['s'] and sometimes doesn't. class Dict(dict): def __getitem__(self, key):

[issue15099] exec of function doesn't call __getitem__ or __missing__ on undefined global

2012-06-18 Thread John Firestone
John Firestone added the comment: I find the behavior inconsistent. As you can see from this example, the exec'uted code *does* call the instance's overloaded __getitem__ and __missing__ methods when outside a function, but doesn

[issue15099] exec of function doesn't call __getitem__ or __missing__ on undefined global

2012-06-18 Thread John Firestone
New submission from John Firestone : exec(source, Dict()) doesn't call Dict().__getitem__ or Dict().__missing__ if the source string contains a function and the function references an undefined global. class Dict1(dict): def __getitem__(self, key): print '__getite

[issue3454] __getitem__() doesn't capture all slices if class inherits from list, tuple or str

2008-07-27 Thread John Firestone
Changes by John Firestone <[EMAIL PROTECTED]>: -- components: Interpreter Core files: getitem_problem.py nosy: johnf severity: normal status: open title: __getitem__() doesn't capture all slices if class inherits from list, tuple or str type: performance versions: Python 2.5