#18083: Stop using old_style_globals
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.6
      Component:  cython             |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Jeroen Demeyer     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jdemeyer/stop_using_old_style_globals|  
9ccd889321d311903d4ab26449e6dd8154879aee
   Dependencies:  #12446, #18084     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nbruin):

 Replying to [comment:10 jdemeyer]:
 > So the one-liner `cython("foo")` is going to change to looking at the
 output of `cython()` plus a manual `import`, probably with some `sys.path`
 manipulation thrown in?
 No, I wasn't proposing to change the user interface of `cython` at all.
 Internally it should be doing the `import` or at least the equivalent of
 it.

 My observation is just that in the architecture of python, it is more
 natural to ask the REPL to inject a binding than to ask an object to
 inject itself into the global scope of the REPL. Hence, we might end up
 with simpler, easier to maintain code if we follow that design and use as
 a fundamental building block a service provided by the REPL.

 For things like `var` and `cython` the interface is already so nice
 (modulo some other issues) that we should probably not change the
 spelling. But for
 {{{
 QQ['x','y'].inject_generators()
 }}}
 it might be nicer (and easier to implement!) to spell it as
 {{{
 inject(Q['x','y'].gens())
 }}}

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