Opened 7 years ago
Closed 6 years ago
#14119 closed defect (worksforme)
Small bug in import statements
Reported by: | chrisjamesberg | Owned by: | chrisjamesberg |
---|---|---|---|
Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
Component: | misc | Keywords: | import_statements |
Cc: | rowland | Merged in: | |
Authors: | Reviewers: | Frédéric Chapoton | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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 (5)
comment:1 Changed 7 years ago by
- Component changed from PLEASE CHANGE to misc
- Description modified (diff)
- Priority changed from major to minor
comment:2 Changed 6 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 6 years ago by
- Milestone changed from sage-5.12 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
In a vanilla 5.12.beta2, I get
sage: import_statements(digraphs) from sage.graphs.digraph_generators import digraphs sage: import_statements(colors) from sage.plot.colors import colors sage: import_statements(qepcad_formula) from sage.interfaces.qepcad import qepcad_formula sage: import_statements(DiGraph) from sage.graphs.digraph import DiGraph
which is perfectly ok.
So let me close this as invalid/wontfix
comment:4 Changed 6 years ago by
- Reviewers set to Frédéric Chapoton
- Status changed from needs_review to positive_review
comment:5 Changed 6 years ago by
- Resolution set to worksforme
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
"Authors" is for author of a patch; you're already the reporter :-)
But
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
:-) (sincesage: 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.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.