Opened 10 years ago

Last modified 9 years ago

#14119 closed defect

Small bug in import statements — at Version 1

Reported by: Chris Berg Owned by: Chris Berg
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: misc Keywords: import_statements
Cc: Eric Rowland Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Karl-Dieter Crisman)

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>

Change History (1)

comment:1 Changed 10 years ago by Karl-Dieter Crisman

Authors: chrisjamesberg
Component: PLEASE CHANGEmisc
Description: modified (diff)
Priority: majorminor

"Authors" is for author of a patch; you're already the reporter :-)


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 that some things do not have a __name__. That's what happens here.

sage: qepcad_formula.__module__
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.

Last edited 10 years ago by Karl-Dieter Crisman (previous) (diff)
Note: See TracTickets for help on using tickets.