[AstroPy] Draft specification for PyFITS functional interface

Victoria G. Laidler laidler at stsci.edu
Thu Mar 31 08:58:44 CST 2005


Hi Tom,

>That said... if the split is made, are you really going to complain
>about having to type:
>
>  import qpyfits, pyfits
>
>versus:
>
>  import pyfits
>
>(or the two "*" imports) on the occassions when you want both interfaces?
>
>As a developer, I think the package idea makes sense, (1) to help
>"compartmentalize" development (in that it reflects a logical division
>between the OO stuff that does the work, and the functional stuff that
>is only an interface to the OO stuff), and (2) to prevent *namespace*
>pollution.  Especially interactively, I can be lazy:
>
>  from pyfits import *
>
Honestly, people who are worried about namespace pollution *shouldn't use*

from foo import *

in the first place, whether foo is pyfits or anything else.

Every style guide or similar document I've seen strongly recommends 
against this syntax.

Of course we all get lazy sometimes, but it's logically inconsistent to 
complain about namespace pollution that only happens if you import *.





More information about the AstroPy mailing list