Nasty typo in PEP 238 (revised)
Andrew Koenig
ark at research.att.com
Fri Jul 27 18:18:33 EDT 2001
David> In article <yu99n15qdzs7.fsf at europa.research.att.com>,
David> Andrew Koenig <ark at research.att.com> wrote:
>> >> A. Use x*1.0/y for true division, divmod(x, y)[0] for int
>> >> division. Especially the latter is best hidden inside a
>> >> function. You may also write floor(x)/y for true division if
>> >> you are sure that you don't expect complex numbers.
>>
David> Shouldn't this be float(x)/y ?
>> What if x is complex?
David> Did you read the last line?
Evidently not. :-)
What I saw was float(x)/y and thought it was being suggested as an
alternative for x*1.0/y without reading the whole context. Sorry about that.
--
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list