#15351: import_statements sometimes fails
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:  vdelecroix
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.2
      Component:  misc               |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/improve_import_statements   |  76e56e25f15d1100b2aa827398616e6ff5756359
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * commit:  60485b907601f34c099c40cdd05841b8dea3c157 =>
     76e56e25f15d1100b2aa827398616e6ff5756359
 * branch:  u/vdelecroix/improve_import_statements =>
     public/improve_import_statements


Comment:

 Hello...

 Really I tried, and I don't get a word of what the main function does. I
 don't get it, I don't get how it does anything, I don't even get at every
 moment which variables can be assumed to be defined, what is left to be
 found, I don't get the flow of it. Sorry, I tried and I just don't get it.

 If you cannot split it into subfunctions further, please add comments to
 say from time to time "This has been defined, now we look for this". I
 just don't get it, all I can do right now is check that three consecutive
 lines make sense, and that's not doing a very good review job.

 I add a small commit with a couple of unimportant modifications.

 Some remarks:

 - Why is `exclude_pattern` overwritten when module is `None` ?
 - "Here we test some instances::" is followed by nothing
 - Why should calling `import_statement` on a module raise an exception ?
 What if I do not know where `graph_decompositions` is located ?
 {{{
 sage: import_statements("graph_decompositions")
 ...
 ValueError: the object '<module 'sage.graphs.graph_decompositions' from
 '/home/ncohen/.Sage/local/lib/python2.7/site-
 packages/sage/graphs/graph_decompositions/__init__.pyc'>' is a module
 }}}

     More importantly, what should the following code do : raise an
 exception of continue ?
 {{{
 raise ValueError("the object '%s' is a module"%obj)
 continue
 }}}

 Nathann
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=c0f9d702a6564aa8528737f6910cb167483dd4b8
 c0f9d70]||{{{trac #15351: Rebase on 6.2.beta5}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=76e56e25f15d1100b2aa827398616e6ff5756359
 76e56e2]||{{{trac #15351: Reviewer's commit}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/15351#comment:18>
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.

Reply via email to