title: What does -> mean in Python function definitions?
body: <p>I've recently noticed something interesting when looking at <a href="http://docs.python.org/3.3/reference/grammar.html" rel="noreferrer">Python 3.3 grammar specification</a>:</p>
  <pre><code>funcdef: 'def' NAME parameters ['-&gt;' test] ':' suite
  </code></pre>
  <p>The optional 'arrow' block was absent in Python 2 and I couldn't find any information regarding its meaning in Python 3. It turns out this is correct Python and it's accepted by the interpreter:</p>
  <pre><code>def f(x) -&gt; 123:
      return x
  </code></pre>
  <p>I thought that this might be some kind of a precondition syntax, but:</p>
  <ul>
  <li>I cannot test <code>x</code> here, as it is still undefined,</li>
  <li>No matter what I put after the arrow (e.g. <code>2 &lt; 1</code>), it doesn't affect the function behavior.</li>
  </ul>
  <p>Could anyone familiar with this syntax style explain it?</p>