#9325: Bugs concerning coding comments and docstrings in sage-preparse
--------------------------------------+-------------------------------------
Reporter: dpoetzsch | Owner: jason
Type: defect | Status: new
Priority: major | Milestone:
Component: misc | Keywords: preparse docstring
Author: David Poetzsch-Heffter | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------------+-------------------------------------
Description changed by dpoetzsch:
Old description:
> I found (and fixed) a few Bugs in the file local/bin/sage-preparse.
>
> These are the things I fixed:
>
> * The module docstrings disappeared when preparsing because the
> preparse_file function inserted those numeric_literals definitions before
> the docstrings.
>
> * Now also unicode-docstrings (e.g. u"""foo""") are recognized as
> docstrings. Also raw docstrings may now use an upper case R as string
> modifier (R"""foo""" would work now) which is allowed in Python.
>
> * Now all coding-comments as specified by Python are found and excluded
> from preparsing.
>
> * I did not fix a bug that occurs when a statement is on the same line
> where the docstring ends (e.g. """foo"""; print 2^5). It will not be
> preparsed! I added a TODO-comment on the according line.
>
> greetings,
> David Poetzsch-Heffter
New description:
I found (and fixed) a few Bugs in the file local/bin/sage-preparse.
These are the things I fixed:
* The module docstrings disappeared when preparsing because the
preparse_file function inserted those numeric_literals definitions before
the docstrings.
* Now also unicode-docstrings (e.g. u"""foo""") are recognized as
docstrings. Also raw docstrings may now use an upper case R as string
modifier (R"""foo""" would work now) which is allowed in Python.
* Now all coding-comments as specified by Python are found and excluded
from preparsing.
* I did not fix a bug that occurs when a statement is on the same line
where the docstring ends, e.g.
{{{
"""foo"""; print 2^5
}}}
It will not be preparsed! I added a TODO-comment on the according line.
greetings,
David Poetzsch-Heffter
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9325#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 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.