ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Jan 2019 12:32:00 +0100how to get hints on fixing silly syntax errorshttps://ask.sagemath.org/question/45243/how-to-get-hints-on-fixing-silly-syntax-errors/ Hi, I just spent half an hour on these two commands.
def mov():
P=matrix(QQ,[[1, 1],[0, 1]]);
show(P)
I retyped them, I moved them in different cells, nothing, I get syntax error.
"<ipython-input-76-049764d5c40b>", line 1
def mov() :
^
SyntaxError: invalid syntax
It works as long as I do not try to make a function
Thu, 31 Jan 2019 12:05:30 +0100https://ask.sagemath.org/question/45243/how-to-get-hints-on-fixing-silly-syntax-errors/Comment by tmonteil for <p>Hi, I just spent half an hour on these two commands. </p>
<pre><code>def mov():
P=matrix(QQ,[[1, 1],[0, 1]]);
show(P)
</code></pre>
<p>I retyped them, I moved them in different cells, nothing, I get syntax error.</p>
<pre><code>"<ipython-input-76-049764d5c40b>", line 1
def mov() :
^
SyntaxError: invalid syntax
</code></pre>
<p>It works as long as I do not try to make a function</p>
https://ask.sagemath.org/question/45243/how-to-get-hints-on-fixing-silly-syntax-errors/?comment=45244#post-id-45244It works for me. Didi you check that the space is not a wrong invisible character ?Thu, 31 Jan 2019 12:32:00 +0100https://ask.sagemath.org/question/45243/how-to-get-hints-on-fixing-silly-syntax-errors/?comment=45244#post-id-45244