<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Anand,</blockquote><div>&nbsp;&nbsp; This is what I exactly mean. This is the thing I want to do. I am now using python 2.5.1 . So is <br>
&nbsp;&nbsp; there a way that I can do a thing like this in python 2.5.1 ( an alternative way).<br><br>&nbsp; Heshan Suriyaarachchi &nbsp;&nbsp;  <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
&gt;&gt;&gt; def f(x : &quot;an integer&quot;, y: &quot;another integer&quot;) -&gt; &quot;Sum of x and y&quot;:<br>
... &nbsp; &nbsp; return x + y<br>
&gt;&gt;&gt; f.__annotations__<br>
{&#39;y&#39;: &#39;another integer&#39;, &#39;x&#39;: &#39;an integer&#39;, &#39;return&#39;: &#39;Sum of x and y&#39;}<br>
<br>
The help() function returns the annotation plus the docstring now.<br>
&gt;&gt;&gt; f.__doc__ = &quot;A sum function&quot;<br>
&gt;&gt;&gt; help(f)<br>
Help on function f in module __main__:<br>
<br>
f(x: &#39;an integer&#39;, y: &#39;another integer&#39;) -&gt; &#39;Sum of x and y&#39;<br>
 &nbsp; &nbsp;A sum function<br>
<br><br>
<div><div></div><div class="Wj3C7c"><br>
</div></div></blockquote></div><br>