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


Groups > comp.lang.python > #76943

Re: Working with decimals

References (6 earlier) <CAN1F8qV3VjrzQc3Ogbjgwm4WzMBbtR0SwNQPJ-kifU5rVNb7cw@mail.gmail.com> <CALwzid=LGedZw6uy6kgm07i5jB2GogepmnahSWf8QRxFfmFxBA@mail.gmail.com> <CALwzidkSMA-u-jL6jXjv7C7vRo-=QqAd72WPfBQzG2ghYSYhKA@mail.gmail.com> <CAN1F8qVZ9BqC2dkN2iLXxGbcC0goHWVwwU=d9d+rQpDZJ3GX4A@mail.gmail.com> <CAN1F8qU4M-zsaQ5fpLkeMMgrZZAk1+BYNCXT98o7F2D5yK=PTA@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2014-08-24 13:40 -0600
Subject Re: Working with decimals
Newsgroups comp.lang.python
Message-ID <mailman.13387.1408909297.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sun, Aug 24, 2014 at 1:29 PM, Joshua Landau <joshua@landau.ws> wrote:
>
> On 24 August 2014 20:25, Joshua Landau <joshua@landau.ws> wrote:
> > On 24 August 2014 20:19, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> >> On Sun, Aug 24, 2014 at 1:17 PM, Ian Kelly <ian.g.kelly@gmail.com>
wrote:
> >>> On Sun, Aug 24, 2014 at 1:12 PM, Joshua Landau <joshua@landau.ws>
wrote:
> >>> > Is math not already imported by start-up?
> >
> > I don't mean into the global namespace, but imported by other modules
> > (like the builtins) and thus cached, making instantiation trivial.
>
> Although it doesn't seem to be:
>
> >>> python -c "import sys; print('math' in sys.modules)"
> False

That's the same check I posted, just using the in operator instead of a
straight lookup and raising an error.

> An even easier check:
>
> >>> python -c "import time; a = time.time(); import math; b =
time.time(); print(b-a)"
> 0.0006012916564941406

Too dependent on system timings. I get:

$ python -c "import time; a = time.time(); import math; b = time.time
(); print(b-a)"
0.0

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


Thread

Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 13:47 -0400
  Re: Working with decimals Joel Goldstick <joel.goldstick@gmail.com> - 2014-08-23 14:21 -0400
    Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 15:07 -0400
      Re: Working with decimals Joel Goldstick <joel.goldstick@gmail.com> - 2014-08-23 15:22 -0400
      Re: Working with decimals Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-23 20:24 +0100
        Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 15:48 -0400
          Re: Working with decimals Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-23 21:31 +0100
  Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 17:13 -0400
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-23 22:47 +0100
    Re: Working with decimals Chris Angelico <rosuav@gmail.com> - 2014-08-24 08:31 +1000
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-23 23:47 +0100
    Re: Working with decimals Chris Angelico <rosuav@gmail.com> - 2014-08-24 08:53 +1000
    Re: Working with decimals Larry Hudson <orgnut@yahoo.com> - 2014-08-24 00:04 -0700
      Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-24 10:58 -0400
      Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-24 11:12 -0400
        Re: Working with decimals Larry Hudson <orgnut@yahoo.com> - 2014-08-24 14:24 -0700
          Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-24 19:07 -0400
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-24 20:12 +0100
    Re: Working with decimals Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-24 13:17 -0600
    Re: Working with decimals Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-24 13:19 -0600
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-24 20:25 +0100
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-24 20:29 +0100
      Re: Working with decimals Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-25 12:16 +1000
        Re: Working with decimals Chris Angelico <rosuav@gmail.com> - 2014-08-25 12:27 +1000
          Re: Working with decimals Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-25 12:51 +1000
            Re: Working with decimals Chris Angelico <rosuav@gmail.com> - 2014-08-25 13:01 +1000
    Re: Working with decimals Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-24 13:37 -0600
    Re: Working with decimals Ian Kelly <ian.g.kelly@gmail.com> - 2014-08-24 13:40 -0600
    Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-24 20:49 +0100
  Re: Working with decimals Joshua Landau <joshua@landau.ws> - 2014-08-23 22:52 +0100
    Re: Working with decimals Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-08-23 18:03 -0400

csiph-web