Checking the boolean value of a collection

Fredrik Lundh fredrik at pythonware.com
Fri Sep 12 11:52:50 EDT 2008


D'Arcy J.M. Cain wrote:

> 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?

basically, yes.  in this case, it does make some sense to patch any/all 
into __builtin__, since they are builtins in a later version.

</F>




More information about the Python-list mailing list