Statement evals as False in my IDE and True elsewhere

Terry Reedy tjreedy at udel.edu
Fri Jan 31 00:05:19 EST 2014


On 1/30/2014 5:55 PM, Chris Angelico wrote:
> On Fri, Jan 31, 2014 at 9:48 AM, CM <cmpython at gmail.com> wrote:
>> builtin_all = __builtins__.all
>>
>> but I got the error:
>>
>> AttributeError: 'dict' object has no attribute 'all'
>
> Try using square brackets notation instead. Apparently your
> __builtins__ is a dictionary, not a module, though I don't know why

For technical reasons Guido once explained and I have fogotten, it 
depends on whether you are in main module or an imported module -- and 
maybe the Python version.

-- 
Terry Jan Reedy




More information about the Python-list mailing list