[Biopython-dev] [Bug 2814] Use properties instead of __getattr__ in FeatureLocation

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sat Apr 18 22:42:57 UTC 2009


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





------- Comment #2 from eric.talevich at gmail.com  2009-04-18 18:42 EST -------
(In reply to comment #1)
> Created an attachment (id=1278)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=1278&action=view) [details]
> Patch to Bio/SeqFeature.py

Peter, you mentioned on the mailing list that this will be applied after the
1.50 release. Since Py2.3 support ends there also, you could use the newer
decorator style instead:

  start = property(fget= lambda self : self._start,
                   doc="Start location (possibly a fuzzy position).")

becomes:

  @property
  def start(self):
      """Start location (possibly a fuzzy position)."""
      return self._start


I think this is the preferred style for Python 2.4 and later.


-- 
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