Ask Your Question

Revision history [back]

This is not a Python vs Sage issue, but a Python2 vs Python3 issue (note that Sage still runs Python2):

With Python 2:

In [1]: def addplot_coordinates(*args, plus_option=False, **kwargs):
   ...:     pass
  File "<ipython-input-1-dace1b5103c9>", line 1
    def addplot_coordinates(*args, plus_option=False, **kwargs):
                                             ^
SyntaxError: invalid syntax

With Python 3:

In [1]: def addplot_coordinates(*args, plus_option=False, **kwargs):
   ...:     pass
   ...:

The workaround (both in Sage and Python2) is to use the following order:

sage: def addplot_coordinates(plus_option=False, *args, **kwargs):
....:     pass

In [2]: def addplot_coordinates(plus_option=False, *args, **kwargs):
   ...:     pass