No, I know there's a typo because python told me there is. If you have
svn repo locally. then cd into Lib/ and run python decimal.py<br><br>It will tell you line 683 has syntax error, please see below.<br><br>haha python-svn # python Lib/decimal.py<br>
File "Lib/decimal.py", line 683<div class="Ih2E3d"><br> sign = 0 if _math.copysign(1.0, f) == 1.0 else 1<br></div> ^<br>SyntaxError: invalid syntax<br><br><br>Although, It may be only because I ran it through python 2.4.3<br>
<br>Thanks for quick response, I wasn't expecting so quick. :) <br><br><br><div class="gmail_quote">On Sun, Jan 4, 2009 at 10:21 AM, Mark Dickinson <span dir="ltr"><<a href="mailto:dickinsm@gmail.com">dickinsm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Jan 4, 9:52 am, "alex goretoy" <<a href="mailto:aleksandr.gore...@gmail.com">aleksandr.gore...@gmail.com</a>> wrote:<br>
> Also, another reason why I'm posting to this thread. I noticed some<br>
> error/typo in line 683 of decimal.py located on public svn repo. This is<br>
> what is looks like.<br>
><br>
> sign = 0 if _math.copysign(1.0, f) == 1.0 else 1<br>
<br>
</div>This line looks okay to me; can you say why you think there's a typo<br>
here?<br>
<br>
If it's the 'sign = 0' part that's bothering you, that's just<br>
a peculiarity of Decimal: the stored sign value is 0 for<br>
positive numbers, 1 for negative numbers, which I agree<br>
is a little counterintuitive. (Think of the sign<br>
as analogous to the sign *bit* in an IEEE 754 floating-point<br>
number.)<br>
<font color="#888888"><br>
Mark<br>
</font><div><div></div><div class="Wj3C7c">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я<br>а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я<br>