[IPython-user] %paste and integer division
Mon Mar 15 00:27:06 CDT 2010
In : 2/3
In : print(2/3)
On Sun, Mar 14, 2010 at 9:30 PM, Brian Granger <firstname.lastname@example.org> wrote:
> Just to double check, what do the following give (leaving autocall on):
> On Sun, Mar 14, 2010 at 12:34 PM, <email@example.com> wrote:
>> I'm configured to get rid of the old integer division, but %paste doesn't
>> take this into account, which is a pain.
>> ipy_user_conf.py :
>> # for sane integer division that converts to float (1/2 == 0.5)
>> o.autoexec.append('from __future__ import division')
>> Turning autocall off doesn't make any difference here. Not that I would want
>> to turn autocall off.
> Brian E. Granger, Ph.D.
> Assistant Professor of Physics
> Cal Poly State University, San Luis Obispo
More information about the IPython-user