#7514: rewrite load and attach
---------------------------+------------------------------------------------
   Reporter:  was          |       Owner:  tbd       
       Type:  enhancement  |      Status:  needs_work
   Priority:  major        |   Milestone:  sage-4.3.1
  Component:  misc         |    Keywords:            
Work_issues:               |      Author:            
   Upstream:  N/A          |    Reviewer:            
     Merged:               |  
---------------------------+------------------------------------------------

Comment(by mpatel):

 I noticed
 {{{
 #!python
 sage: f = 1
 sage: save(f, 'f')
 sage: attach('f.sobj')
 Traceback (most recent call last)
 ...
 ValueError: argument (='f.sobj') to load or attach must have extension py,
 sage, or pyx
 sage: attached_files()
 ['f.sobj']
 }}}

 Questions about loading/attaching Cython files:

  * Can they only be loaded once, if they haven't changed?  For example: If
 `zzz.pyx` contains `print 'Zzz!'`, I see
 {{{
 #!python
 sage: load('zzz.pyx')
 Compiling zzz.pyx...
 Zzz!
 sage: load('zzz.pyx')
 sage: load('zzz.pyx')
 sage: # Now I edit zzz.pyx
 sage: load('zzz.pyx')
 Compiling zzz.pyx...
 Awake!
 }}}

  * Can they access existing objects?  For example: If I put
 {{{
 #!python
 try:
     b += 1
 except:
     b = 10
 print b
 }}}

     in a .pyx file, loading the file always sets `b` to 10, even if it's
 already defined.

 Disclaimer:  I'm still quite ignorant about Cython.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7514#comment:10>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to