Design: Module interface vs. library interface

Aahz aahz at pythoncraft.com
Sun Oct 10 17:17:34 EDT 2010


In article <4C8B8123.80704 at sschwarzer.net>,
Stefan Schwarzer  <sschwarzer at sschwarzer.net> wrote:
>
>Which approach would you prefer and why? Or some other approach? Would
>you use a different approach if the library-internal class was named
>`_FTPFile` instead of `FTPFile`?

If it's not a public class, it should have been named `_FTPFile`.  When
your class isn't public, it doesn't matter much exactly how you expose it
internally.  (I essentially never use __all__ myself, but I don't write
libraries for public consumption.)
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair



More information about the Python-list mailing list