'None' is not displayed as I expected in Python interactive mode
<p>I thought the display in Python interactive mode was always equivalent to <code>print(repr())</code>, but this is not so for <code>None</code>. Is this a language feature or am I missing something? Thank you</p>

<pre><code>&gt;&gt;&gt; None
&gt;&gt;&gt; print(repr(None))
None
&gt;&gt;&gt;
</code></pre>

<p>It's a deliberate feature. If the python code you run evaluates to exactly <code>None</code> then it is not displayed.</p>

<p>This is useful a lot of the time. For example, calling a function with a side effect may be useful, and such functions actually return <code>None</code> but you don't usually want to see the result.</p>

<p>For example, calling <code>print()</code> returns <code>None</code>, but you don't usually want to see it:</p>

<pre><code>&gt;&gt;&gt; print("hello")
hello
&gt;&gt;&gt; y = print("hello")
hello
&gt;&gt;&gt; y
&gt;&gt;&gt; print(y)
None
</code></pre>

python