Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66407

Re: decimal numbers

From "Frank Millman" <frank@chagford.com>
Subject Re: decimal numbers
Date 2014-02-15 12:49 +0200
References <833583c7-c307-4ebf-9a60-3be146a565b5@googlegroups.com> <ec88852e-1384-4aa5-834b-85135be94ab9@googlegroups.com> <mailman.6976.1392458669.18130.python-list@python.org> <ae0da085-6c41-4166-92d2-92611a990885@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.6978.1392461388.18130.python-list@python.org> (permalink)

Show all headers | View raw


"Luke Geelen" <luke.geelen@gmail.com> wrote in message 
news:ae0da085-6c41-4166-92d2-92611a990885@googlegroups.com...
> Op zaterdag 15 februari 2014 11:04:17 UTC+1 schreef Frank Millman:
>> "Luke Geelen" <luke.geelen@gmail.com> wrote in message
>>
>> news:ec88852e-1384-4aa5-834b-85135be94ab9@googlegroups.com...
>>
[...]
>>
>> You can reproduce the python3 behaviour in python2 by adding a 'future' 
>> directive -
>>
>> >>> from __future__ import division
>>
>> >>> 10/3
>>
>> 3.3333333333333335
>>
>
> how (and where) would i add this rule into a script? by import or the 
> calculation?

Treat it like any other import - add it as a new line at the top of your 
script.

Frank


Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

decimal numbers luke.geelen@gmail.com - 2014-02-15 01:18 -0800
  Re: decimal numbers Luke Geelen <luke.geelen@gmail.com> - 2014-02-15 01:19 -0800
    Re: decimal numbers "Frank Millman" <frank@chagford.com> - 2014-02-15 12:04 +0200
      Re: decimal numbers Luke Geelen <luke.geelen@gmail.com> - 2014-02-15 02:32 -0800
        Re: decimal numbers "Frank Millman" <frank@chagford.com> - 2014-02-15 12:49 +0200
          Re: decimal numbers Luke Geelen <luke.geelen@gmail.com> - 2014-02-15 09:17 -0800
            Re: decimal numbers Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-15 10:23 -0700
              Re: decimal numbers Luke Geelen <luke.geelen@gmail.com> - 2014-02-15 09:42 -0800
                Re: decimal numbers Luke Geelen <luke.geelen@gmail.com> - 2014-02-15 10:57 -0800
                Re: decimal numbers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-15 19:06 +0000
                Re: decimal numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-15 19:43 +0000
                Re: decimal numbers Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-15 14:34 -0700
                Re: decimal numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-16 02:30 +0000
                Re: decimal numbers Chris Angelico <rosuav@gmail.com> - 2014-02-16 13:36 +1100
        Re: decimal numbers "Frank Millman" <frank@chagford.com> - 2014-02-15 12:56 +0200
    Re: decimal numbers Chris Angelico <rosuav@gmail.com> - 2014-02-15 21:13 +1100
  Re: decimal numbers Laurent Pointal <laurent.pointal@free.fr> - 2014-02-15 15:52 +0100
  Re: decimal numbers Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-15 10:20 -0700
  Re: decimal numbers wxjmfauth@gmail.com - 2014-02-16 04:19 -0800

csiph-web