Hello Everybody ! With sage in emacs I test this single function, but I get an error :
> def ff (n) : > if n==0 : > return(1) > else : > return(n*ff(n-1)) I type theses lines in a buffer, and I copy by Ctrl-K / Ctrl-Y in sage-buffer Then I get this error : > ....: ....: ....: > ------------------------------------------------------------ > File "<ipython console>", line 4 > se : > ^ > SyntaxError: invalid syntax > > sage: ------------------------------------------------------------ > File "<ipython console>", line 1 > SyntaxError: 'return' outside function (<ipython console>, line 1) > > sage: But functions and tests without "else :" are right. I deplace the else: line at the very beginning, under others lines and get the same error. What is the shortest test with else: I must try ? Many thanks. F. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---