Statement evals as False in my IDE and True elsewhere
Chris Angelico
rosuav at gmail.com
Fri Jan 31 00:07:50 EST 2014
More information about the Python-list mailing list
Fri Jan 31 00:07:50 EST 2014
- Previous message (by thread): Statement evals as False in my IDE and True elsewhere
- Next message (by thread): Statement evals as False in my IDE and True elsewhere
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Jan 31, 2014 at 4:05 PM, Terry Reedy <tjreedy at udel.edu> wrote: > 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. Ah, okay. Anyway, the error message makes it clear. I love clear error messages. ChrisA
- Previous message (by thread): Statement evals as False in my IDE and True elsewhere
- Next message (by thread): Statement evals as False in my IDE and True elsewhere
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list