On Wed, Mar 11, 2009 at 10:55 PM, R (Chandra) Chandrasekhar <chyav...@gmail.com> wrote: > > Folks, > > I have one suggestion for the Sage Tutorial. > > In Section 2.3, after the text > > == > > sage: def is_even(n): > ... return n%2 == 0 > == > > I suggest that you add an instruction to press [Enter/Return/Newline] > after the > > ... return n%2 == 0 > > to conclude the definition. > > When I followed the instruction exactly as it is given, without > inserting a blank line, I got an error like this: > === > sage: def is_even(n): > ....: return n%2 == 0 > ....: sage: is_even(2) > ------------------------------------------------------------ > File "<ipython console>", line 3 > sage: is_even(Integer(2)) > ^ > SyntaxError: invalid syntax > === > > It was only after I emailed sage-support that I was told I needed to > insert a blank line to conclude the definition. Because I am new to > Python, this was not old hat to me. Hence my suggestion to append: > ==== > Insert a blank line here by pressing [Return or Enter] > > (after the line > > ... return n%2 == 0) > ==== > Many thanks. > > Chandra
That's a great idea. I've made a trac ticket: http://trac.sagemath.org/sage_trac/ticket/5500 --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---