[Tutor] A slight bug in IDLE
Jim Mooney
cybervigilante at gmail.com
Sat Jul 13 20:29:08 CEST 2013
Steven D'Aprano <steve at pearwood.info>
No, actually, it's the opposite of a gotcha. If a module expects to use
truncated division, and *fails* to "from __future__ import division",
that's what it needs to get. If your import would change what the other
module sees, then you could change the behaviour of the other module (and
probably break it) just by importing something from __future__.
====
> \
Or worse, break it in a way that wasn't apparent until the plane fell out
of the sky ;')
Actually, I meant the reverse gotcha. Expecting float division when your
imported module stuck to truncated. But either way it's good to know
__future__ is not your usual sort of import.
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130713/ca55d50c/attachment.html>
More information about the Tutor
mailing list