Opened 11 years ago

Last modified 6 weeks ago

#13149 new defect

Function names used as default parameters are incorrectly quoted in documentation

Reported by: mjo Owned by: mvngu
Priority: major Milestone:
Component: documentation Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description

This shows up in #11785. We define a function,

def string_length(expr):
    """
    Returns the length of ``expr`` after converting it to a string.
    ...

And then use that as the default for another function's argument:

def simplify_rectform(self, complexity_measure = string_length):
    r"""
    Attempt to simplify this expression by expressing it in the
    form `a + bi` where both `a` and `b` are real.
    ...

In the docs, the string_length function appears quoted, which makes it look like we accept a string for the complexity_measure:

Type:           builtin_function_or_method
Base Class:     <type 'builtin_function_or_method'>
String Form:    <built-in method simplify_rectform of sage.symbolic.expression.Expression$
Namespace:      Interactive
Definition:     f.simplify_rectform(self, complexity_measure=' string_length')
Docstring:
...

Change History (5)

comment:1 Changed 9 years ago by jdemeyer

Milestone: sage-5.11sage-5.12

comment:2 Changed 9 years ago by vbraun_spam

Milestone: sage-6.1sage-6.2

comment:3 Changed 9 years ago by vbraun_spam

Milestone: sage-6.2sage-6.3

comment:4 Changed 9 years ago by vbraun_spam

Milestone: sage-6.3sage-6.4

comment:5 Changed 6 weeks ago by mkoeppe

Milestone: sage-6.4
Note: See TracTickets for help on using tickets.