On Thu, May 28, 2009 at 06:47:02AM -0700, C. Titus Brown wrote:
-> 
-> On Thu, May 28, 2009 at 06:25:41AM -0700, Istvan Albert wrote:
-> -> > I think we should either define an __iter__ function that says "don't do
-> -> > this!" *or* we should support the full range of dict functions on NLMSA.
-> -> > I vote for the former for 0.8, and the latter for post-0.8.
-> -> 
-> -> I think some of the original dict functions were ill conceived, that's
-> -> why you end up with both items() and iteritems(), so going for a full
-> -> support may mean a lot of work to implement features that are not all
-> -> the useful. Picking the main use cases like iteration may be enough.
-> 
-> We've already done it for the seqdb and annotation db stuff; it's not
-> much work.  (It's annoying and detail-oriented, though.)
-> 
-> I'll take this as a vote for putting in an __iter__ function that
-> complains, for now ;)

Implemented.

-> -> > Third, NLMSASlice objects could use a more informative __repr__. ?How
-> -> > about including the sequence ID (slice.seq.id) in there?
-> -> 
-> -> Here I probably have opinion may differ from yours. I think it is a
-> -> mistake to try be too helpful. I found that when a class does not
-> -> print its class name but some "helpful" information, I end up with
-> -> more work. That is because most of the time one does not know how to
-> -> use the class, and wants to look up that info in the docs. So I am
-> -> usually more happy with <ClassName instance> type of default reprs
-> -> that point me where to look.
-> 
-> So, how about
-> 
->      <ClassName instance (sequence %s)>
-> 
-> ?  Fits both our concerns...

Implemented.

---

See git://github.com/ctb/pygr.git, branch 'nlmsa_iter_repr':

        http://github.com/ctb/pygr/commits/nlmsa_iter_repr/

Comments welcome, but I think it's ready for commit.

cheers,
--titus
-- 
C. Titus Brown, c...@msu.edu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to pygr-dev@googlegroups.com
To unsubscribe from this group, send email to 
pygr-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to