Checking the boolean value of a collection

D'Arcy J.M. Cain darcy at druid.net
Fri Sep 12 11:19:49 EDT 2008


On Fri, 12 Sep 2008 17:11:47 +0200
Fredrik Lundh <fredrik at pythonware.com> wrote:
> The "__builtins__" object is an implementation detail, and shouldn't be 
> accessed directly.  And I hope I don't need to point out that adding 
> custom builtins nillywilly is a bad idea...

Is there ever any advantage to having something as a builtin rather
than as a regular user method?  What difference does it make to the
running script?  I can see that adding "bar" from module "foo" to
"__builtins__" means that you can use "bar()" instead of "foo.bar()".
Is that the only benefit?

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list