Python function definition
<pre><code>def CsMatrix(X not None):
</code></pre>

<p>I meet this piece of code. For <strong><em>X not None</em></strong>, I haven't met this kind of syntax? So I write my test code:</p>

<pre><code>def test(x not None):

    pass
</code></pre>

<p>However, I got SyntaxError: invalid syntax.
Can anyone explain this syntax?</p>

<p>You can not do that. What you can do is</p>

<pre><code>def test(x):
    if x is None:
        return
    ... #  All the further actions with x
</code></pre>

python