#3342: bizarre source code introspection output
-------------------------------------------------+-------------------------
Reporter: was | Owner: tba
Type: defect | Status: closed
Priority: minor | Milestone:
Component: documentation | sage-4.5.2
Keywords: | Resolution: fixed
Authors: Willem Jan Palenstijn | Merged in:
Report Upstream: Fixed upstream, but not in a | sage-4.5.2.alpha1
stable release. | Reviewers: John
Branch: | Palmieri
Dependencies: | Work issues:
| Commit:
| Stopgaps:
-------------------------------------------------+-------------------------
Description changed by chapoton:
Old description:
> I observed the following in sage-3.0.2 on both Linux and OS X.
> Note the very bizarre output of x.is_zero??
>
> {{{
> sage: R.<x,y> = QQ[]; S.<x,y> = Frac(R)
> sage: x.is_zero??
> Type: builtin_function_or_method
> Base Class: <type 'builtin_function_or_method'>
> String Form: <built-in method is_zero of FractionFieldElement object
> at 0x2afd954b16e0>
> Namespace: Interactive
> Source:
> def is_zero(self):
> """
> Return True if self equals self.parent()(0). The default
> implementation is to fall back to 'not self.__nonzero__'.
>
> NOTE: Do not re-implement this method in your subclass but
> implement __nonzero__ instead.
> """
> return not selfClass Docstring:
> <attribute '__doc__' of 'builtin_function_or_method' objects>
>
> }}}
New description:
I observed the following in sage-3.0.2 on both Linux and OS X.
Note the very bizarre output of x.is_zero??
{{{
sage: R.<x,y> = QQ[]; S.<x,y> = Frac(R)
sage: x.is_zero??
Type:builtin_function_or_method
Base Class:<type 'builtin_function_or_method'>
String Form:<built-in method is_zero of FractionFieldElement object at
0x2afd954b16e0>
Namespace:Interactive
Source:
def is_zero(self):
"""
Return True if self equals self.parent()(0). The default
implementation is to fall back to 'not self.__nonzero__'.
NOTE: Do not re-implement this method in your subclass but
implement __nonzero__ instead.
"""
return not selfClass Docstring:
<attribute '__doc__' of 'builtin_function_or_method' objects>
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/3342#comment:13>
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/d/optout.