[sage-devel] Re: C++ pyrex question

2006-11-08 Thread Robert Bradshaw
On Nov 7, 2006, at 10:02 PM, William Stein wrote: > On Tue, 07 Nov 2006 09:31:43 -0800, <[EMAIL PROTECTED]> wrote: > >> %sage >> notebook code >> notebook code >> notebook code >> >> %html >> ... >> ... >> >> %sage >> notebook code >> notebook code >> >> Would you be allowed to switch contexts wi

[sage-devel] Re: C++ pyrex question

2006-11-07 Thread William Stein
On Tue, 07 Nov 2006 09:31:43 -0800, <[EMAIL PROTECTED]> wrote: > > You mean like PHP? Yes, I guess. I didn't know php does this. > %sage > notebook code > notebook code > notebook code > > %html > ... > ... > > %sage > notebook code > notebook code > > Would you be allowed to switch contexts

[sage-devel] Re: C++ pyrex question

2006-11-07 Thread boothby
You mean like PHP? %sage notebook code notebook code notebook code %html ... ... %sage notebook code notebook code Would you be allowed to switch contexts within a control structure? class foo: %sagex #this is useful def bar(self,n): return n*n %sage def baz(self,

[sage-devel] Re: C++ pyrex question

2006-11-07 Thread Martin Albrecht
> With the SAGE preparser (for .sage files and in the notebook), we could > even do something so > > f = lambdax n,m : return n * m + 1 > > would really get SAGEx'd. We could also make a special syntax so > whole blocks of code can be SageX'd on the fly, without having to > be included in tr

[sage-devel] Re: C++ pyrex question

2006-11-07 Thread William Stein
On Tue, 07 Nov 2006 02:29:57 -0800, Martin Albrecht <[EMAIL PROTECTED]> wrote: > On Tuesday 07 November 2006 10:38, you wrote: >> >> For example, in the latest SAGE (/home/was/sage-dev) try this (at >> the command prompt): >> >> >> >> sage: sagex("def foo(n,m): return n*m + 17") >> >>