On Tue, Apr 27, 2010 at 7:12 AM, cool-RR <span dir="ltr"><<a href="mailto:cool-rr@cool-rr.com">cool-rr@cool-rr.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div dir="ltr">This was probably discussed a lot. Why is there no simple `sign` function in Python, like in the math module or something? I mean one that tells you the sign of a number.<div><br></div></div></blockquote><div>

<br>I really hate to shot you down man. First of all, how are you returning the sign? True/False for positive or negative? What about zero? Is zero a positive or a negative number?<br><br>Secondly, when you get the output, how are you using it? Comparison -- ah wait, there is always <span style="font-family: courier new,monospace;">if x > 0</span> ... <br>

<br>I think you need to carefully think about these ideas before proposing them. I feel you're wasting your own time, here.<br><br>Cheers,<br>Xav<br></div></div>