[Python-3000] IO __all__

Brett Cannon brett at python.org
Wed Apr 2 09:30:48 CEST 2008


On Wed, Apr 2, 2008 at 4:36 AM, Benjamin Peterson
<musiccomposition at gmail.com> wrote:
>
>
>
> On Tue, Apr 1, 2008 at 6:43 PM, Guido van Rossum <guido at python.org> wrote:
> > Well, it *is* part of the public interface of io.py, and it *is* the
> > implementation of the built-in open() function. So I don't think this
> > should be changed. The module's name is so short that I hope people
> > won't import * from it.
> Ok. It just seems to me to be an accident waiting to happen which we could
> easily avoid.
>

But people should not blindly do an ``import *``. I agree with Guido
it is better for __all__ to reflect the API of the library than to
worry about blocking a built-in which happens to be the exact same
object.

-Brett

> >
> >
> >
> >
> >
> > On Tue, Apr 1, 2008 at 1:46 PM, Benjamin Peterson
> > <musiccomposition at gmail.com> wrote:
> > > Is there a reason io.open is in the __all__? It seems to me it would
> > > redundant and confusing to import a builtin.
> >
> > --
> > --Guido van Rossum (home page: http://www.python.org/~guido/)
> >
>
>
>
> --
> Cheers,
> Benjamin Peterson
> _______________________________________________
>  Python-3000 mailing list
>  Python-3000 at python.org
>  http://mail.python.org/mailman/listinfo/python-3000
>  Unsubscribe:
> http://mail.python.org/mailman/options/python-3000/brett%40python.org
>
>


More information about the Python-3000 mailing list