Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
trac 23551 adding explanation and doctest in the developer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Aug 6, 2017
1 parent fb09ba9 commit ef399c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/doc/en/developer/coding_basics.rst
Expand Up @@ -862,6 +862,18 @@ written.
5
7

- **Python3 print:** even if Python2 syntax for print can still be
used in your own code for the moment, Python3 syntax for print must
be used in Sage code and doctests. If you use an old-style print in
doctests, it will raise a SyntaxError::

sage: print "not like that"
Traceback (most recent call last):
...
SyntaxError: invalid syntax
sage: print("but like this")
but like this

- **Split long lines:** You may want to split long lines of code with a
backslash. Note: this syntax is non-standard and may be removed in the
future::
Expand Down

0 comments on commit ef399c4

Please sign in to comment.