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


Groups > comp.lang.python > #78694

Re: A little more: decimal_portion

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.031
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'function,': 0.09; 'subtle': 0.09; 'cc:addr:python-list': 0.11; 'ah,': 0.16; 'compares': 0.16; 'did.': 0.16; 'formula': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'version.': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'am,': 0.29; 'generally': 0.29; 'message-id:@mail.gmail.com': 0.30; 'included': 0.31; 'that.': 0.31; 'problem.': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:skip:d 10': 0.36; 'doing': 0.36; 'does': 0.39; 'how': 0.40; "you'll": 0.62; 'subject:more': 0.64; 'click': 0.77; 'shell,': 0.91; 'step.': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=B1NY06LQCu+m0Ej1TY/rCk66e7+vfTPVlfS6ANT91Rs=; b=OTgEHUUyCrNI4VeV4RkLcDTwwWOjD4TKxm0+BEslg+ZthEMc+HSIOKnm4C33UnJ17l yLh93tz1knbjM1SwxiMtV8nstDUxyGe5iwiYVr4pclba/Rncu4SuEPguiIImCTCK2GZF +zOLR0nesYkTbr7VrxwURCswDD1e3+cLe88nIVOI+8KLQE/wuDXwd3+iIY06eYOAq+wN 4edZeb3Rvbu3kzlQ6BsHHwAyVRdlC20/LYTr0k9iOMadkX4n3QVMACCg6NXnkSVQY+ba IGlXqoQ1ty1wGB9hr5iTyk07+/19rJ+J755sDGnVz0zxze71iPN6JwXuIUlmMMf/tM/+ J2kw==
MIME-Version 1.0
X-Received by 10.50.20.169 with SMTP id o9mr7125939ige.14.1412436280815; Sat, 04 Oct 2014 08:24:40 -0700 (PDT)
In-Reply-To <7j303a9e0g7ipe7se3s5qc364nurjrcknp@4ax.com>
References <2p203aldkhli65bd9crd4ljbfuab0u90oc@4ax.com> <mailman.14599.1412435262.18130.python-list@python.org> <7j303a9e0g7ipe7se3s5qc364nurjrcknp@4ax.com>
Date Sun, 5 Oct 2014 01:24:40 +1000
Subject Re: A little more: decimal_portion
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14600.1412436289.18130.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412436289 news.xs4all.nl 2903 [2001:888:2000:d::a6]:43124
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3588
X-Received-Body-CRC 3960757121
Xref csiph.com comp.lang.python:78694

Show key headers only | View raw


On Sun, Oct 5, 2014 at 1:16 AM, Seymore4Head
<Seymore4Head@hotmail.invalid> wrote:
> I did.  I included a screenshot of me doing just that.
> The formula seems to work in the shell, but does not work as a
> function, or I am missing something subtle again.

Ah, I don't generally click screenshots.

Have the function print out exactly what it's doing at each step. See
how that compares to your hand-worked version. You'll see the problem.

ChrisA

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


Thread

A little more: decimal_portion Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-04 10:58 -0400
  Re: A little more: decimal_portion Chris Angelico <rosuav@gmail.com> - 2014-10-05 01:07 +1000
    Re: A little more: decimal_portion Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-04 11:16 -0400
      Re: A little more: decimal_portion Chris Angelico <rosuav@gmail.com> - 2014-10-05 01:24 +1000
        Re: A little more: decimal_portion Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-04 11:38 -0400
  Re: A little more: decimal_portion Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-05 01:46 +1000
    Re: A little more: decimal_portion Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-04 12:11 -0400
      Re: A little more: decimal_portion wxjmfauth@gmail.com - 2014-10-05 00:14 -0700

csiph-web