[AstroPy] Coding Guidelines draft (comments encouraged)

Geert Barentsen geert at barentsen.be
Fri Jul 15 12:14:55 EDT 2011


Hi Erik et al,

Many thanks for your efforts on astropy, this seems very worthwile !

My suggestion for the coding guidelines would be to urge people not to use
multiple inheritance altogether. Your guideline to avoid "super()" does not
remove ambiguity in the case where a subclass does -not- override a method
that is implemented by 2 or more superclasses (in this case the
super-mechanism still works its magic... unless you demand that every
subclass in the whole chain overrides -every- method?)

I don't think it is ever possible to use multiple inheritance without
understanding the somewhat complex details. Simply having code guidelines
which say "do not inherit from more than one class at a time" are far less
scary than the complex story about super(). I'm happy to change my opinion
if someone comes up with a good example where multiple inheritance makes
life better :-)  ... when I studied computer science in university the
consensus was they are rare!

Geert



On 10 July 2011 06:39, Erik Tollerud <erik.tollerud at gmail.com> wrote:

> Hello everyone,
>
> Now that the vision and name for astropy have been ratified, the
> Coordinating Committee (Thomas, Perry, and I) have been working on a
> draft of coding guidelines/requirements for the astropy package.  The
> intent is to use these items to determine if code in affiliated
> packages can be merged with the core package (as outlined in the
> vision).  I've posted our draft of these guidelines to the wikispaces
> page:
>
> http://astropy.wikispaces.com/Astropy+Coding+Guidelines
>
> Feel free to ask questions about or comment on any of these items.  We
> want to make sure the community is on board with a common set of
> guidelines, so we have tried to take into account discussions that
> have already occurred on this list in this draft.  Many of these items
> have not yet been discussed,  however, so we will certainly adjust
> these guidelines (or add new ones) based on your feedback once
> consensus is reached on the list.  We do ask, though, that the
> comments/discussion be on the mailing list instead of the wiki page,
> so that the archive of the mailing list preserves the full discussion.
>
>
> Also, note that the guidelines reference both a documentation and
> testing guidelines document.  I have created pages for these documents
> as well:
>
> Documentation:
> http://astropy.wikispaces.com/Astropy+Documentation+Guidelines
> Testing: http://astropy.wikispaces.com/Astropy+Testing+Guidelines
>
> These documents are not fleshed-out, as we wish to solicit ideas from
> the community here.  I will send additional messages to this mailing
> list shortly to begin the discussion these topics, and ask again that
> the discussion for each take place in their associated threads.
>
>
> In the near future we (the committee) will also be sending out a
> message on determining project hosting and choice of VCS, as well as a
> set of priorities to guide development.  Once we  (the community) have
> reached consensus on this items, we can begin the actual work in
> earnest!
>
> Thanks in advance for your ideas and comments!
>
> --
> Erik Tollerud
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20110715/875e3dc1/attachment.html>


More information about the AstroPy mailing list