#14119: Small bug in import statements
-------------------------------------+--------------------------------------
Reporter: chrisjamesberg | Owner: chrisjamesberg
Type: defect | Status: new
Priority: minor | Milestone: sage-5.8
Component: misc | Resolution:
Keywords: import_statements | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Changes (by kcrisman):
* priority: major => minor
* component: PLEASE CHANGE => misc
* author: chrisjamesberg =>
Old description:
> Eric Rowland pointed out the following weird behavior with respect to
> import_statements.
>
> sage: import_statements(digraph)
>
> from sage.graphs.digraph_generators import
> <sage.graphs.digraph_generators.DiGraphGenerators instance at
> 0x115bf4b00>
New description:
Eric Rowland pointed out the following weird behavior with respect to
import_statements.
{{{
sage: import_statements(digraphs)
from sage.graphs.digraph_generators import
<sage.graphs.digraph_generators.DiGraphGenerators instance at 0x115bf4b00>
}}}
--
Comment:
"Authors" is for author of a patch; you're already the reporter :-)
But
{{{
sage: import_statements(DiGraph)
from sage.graphs.digraph import DiGraph
}}}
so maybe that's okay?
A few things also give "class" instead of this, a few (colors) give
dictionaries, and don't even try `copying` :-) (since `sage: print
"%s"%copying` ends up printing the entire license statement).
Basically, we probably need a little more uniformity in what `__module__`
returns, and some things do not have a `__name__`. That's what happens
here.
{{{
sage: qepcad_formula.__module__
'sage.interfaces.qepcad'
sage: qepcad_formula
<sage.interfaces.qepcad.qepcad_formula_factory instance at 0x103b37290>
}}}
So this might need a bit more work than just fixing one thing.
----
I also note that this doesn't actually return a string, but simply prints
the imports and then returns `None`. I don't know if I like that.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14119#comment:1>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.