[Biopython] Atom inheritance from Entity

João Rodrigues j.p.g.l.m.rodrigues at gmail.com
Wed Sep 4 06:02:05 UTC 2019


Hi Spencer,

Something that bugged me in the past as well. It would be nicer to have
everyone inherit from a single point, but since Atoms don't have children,
it would be confusing to have these methods there. My understanding is that
Entity only exists to provide methods to handle iteration over children
objects. It's a compromise?

Thanks for the efforts in typing the module!

João

Spencer Bliven <spencer.bliven at gmail.com> escreveu no dia terça, 3/09/2019
à(s) 22:53:

> I was wondering why Atom doesn't inherit from Entity. It doesn't have
> children, but it seems like it would be more consistent to have the whole
> Structure stack inherit from a single point. Is anyone aware of the history
> there?
>
> I ask because I'm trying to add type annotations to Bio.PDB, and mypy
> flagged a number of places where my initial 'Entity' type conflicted with
> Atoms. We can certainly get around this by accepting either Entity or Atom,
> but I'm not sure that was intended.
>
> -Spencer
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> https://mailman.open-bio.org/mailman/listinfo/biopython
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20190903/2493a1be/attachment.htm>


More information about the Biopython mailing list