#10864: Bug in Huffman algorithm
-----------------------------+----------------------------------------------
Reporter: jsrn | Owner: wdj
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: coding theory | Keywords: huffman
Author: Nathann Cohen | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by jsrn):
Ok, I see that I used the class in the wrong way :-)
Wouldn't it be more user-friendly to change the Huffman constructor to
accept only one unnamed argument, and then treat it according to type,
e.g:
{{{
def __init__(self, source):
if isinstance(source, string):
# init by string
elif isinstance(source, dict):
# init by dict
else:
# give the user an error
}}}
(Because of deprecation policy, I guess we would need to support the
current interface in some way, which would make the code a bit messy, but
that will only be for a year)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10864#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.