#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:8 jdemeyer]:
 > So instead of calling `initialize_globals()` at global scope, you define
 `inject()` at global scope. That doesn't seem more simple or flexible.

 No, it doesn't make much practical difference. You're basically storing
 the dictionary on `inject.func_globals` instead of a custom store. I think
 it's useful to see that there's a "natural" way of expressing the concept
 in pure python. What the actual implementation underneath is, is another
 matter. I think it's worthwhile to give some consideration to using an
 implementation that is "natural" to python. The "natural" place for an
 inject to live is in the user scope, not as a method on various objects.

 > And I don't understand how you would implement `cython()` using your
 approach.

 That's a matter of import, isn't it? Compiling cython normally gives a
 module `tmp_cython_module` and with `cython` you basically do a `from
 tmp_cython_module import *`.

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