#14951: tokenize() function in logic/logicparser.py infinite loop
------------------------------------------------+--------------------------
Reporter: pmscurek | Owner: Paul
Type: defect | Scurek
Priority: major | Status: new
Component: misc | Milestone: sage-5.11
Keywords: logic, propcalc, logicparser | Resolution:
Authors: Paul Scurek | Merged in:
Report Upstream: N/A | Reviewers:
Branch: | Work issues:
Stopgaps: | Dependencies:
------------------------------------------------+--------------------------
Comment (by was):
It is OK that the docstrings are not formatted as in the reference manual,
for *consistency* with the rest of this file. We'll apply Mike Hansen's
automatic old docstring --> new docstring conversion tool to the whole
logic/ module later.
[ ] Rewrite polish_notation to use
{{{
''.join(sage.misc.flatten(logicparser.polish_parse(repr(self))))
}}}
[ ] Move this comment (below) so it aligns correctly, and there is a space
after #:
{{{
tree = tree_parse(toks, polish = True)
#special case where the formula s is a single variable
if type(tree) is StringType and len([tree]) == 1:
}}}
[ ] This looks suspicious since it is always tautologically true -- see if
you can figure out what's up with this craziness:
{{{
len([tree]) == 1
}}}
[ ] The Python way to do this
{{{
type(tree) is StringType
}}}
is to do this:
{{{
isinstance(tree, StringType)
}}}
[ ] Clean up this comment:
{{{
#check to see if '-', '<' or '>' are used incorretly
}}}
to
{{{
# check to see if '-', '<' or '>' are used incorrectly
}}}
[ ] Typo: {{{When true, caues the function to produce the full }}}
(missing letter in "caues")
[ ] Mention the default values in docstrings.
[ ] In python replace {{{if polish == False:}}} by the more idomatic {{{if
not polish}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/14951#comment:2>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.