[Biopython-dev] [Bug 2879] missing __delitem__ in Bio.PDB.Entity.Entity

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat May 29 19:52:13 UTC 2010


http://bugzilla.open-bio.org/show_bug.cgi?id=2879





------- Comment #5 from eric.talevich at gmail.com  2010-05-29 15:52 EST -------
(In reply to comment #4)
> Solution 2: Implement Entity.__delitem__, essentially identical to
> Entity.detach_child. Look at the implementations of __getitem__ in the other
> subclasses of Entity to see if anything fancy needs to be done to support
> __delitem__ in each of them.

Done on the same branch. Nothing fancy was needed in the other Entity
subclasses.

NB: It looks like Entity supports some methods that are handled just as well by
the appropriate magic methods and Python syntax: get_list => __iter__,
detach_child => __delitem__, has_id => __contains__. We should eventually
deprecate those methods, make some others non-public, and promote the use of
properties and magic syntax instead, I think.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list