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


Groups > comp.lang.python > #65185

Re: Help with some python homework...

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <bouncingcats@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status UNSURE 0.277
X-Spam-Level **
X-Spam-Evidence '*H*': 0.45; '*S*': 0.00; 'scaling': 0.07; 'subject:Help': 0.11; 'quoted': 0.16; 'sec': 0.16; 'units.': 0.16; 'uppercase': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'feb': 0.22; 'to:name:python- list@python.org': 0.22; 'error': 0.23; 'case.': 0.24; 'hours,': 0.24; 'define': 0.26; 'this:': 0.26; 'defined': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'especially': 0.30; 'message- id:@mail.gmail.com': 0.30; 'constant': 0.31; 'subject:some': 0.31; 'everyone': 0.33; 'subject:with': 0.35; 'one,': 0.35; 'received:google.com': 0.35; 'cancel': 0.36; 'should': 0.36; 'seconds': 0.37; 'two': 0.37; 'list': 0.37; 'clear': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'quote': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'units': 0.60; 'conversion': 0.61; 'lower': 0.61; 'you.': 0.62; 'reach': 0.63; 'name': 0.63; 'different': 0.65; 'holding': 0.65; 'situation': 0.65; 'hours': 0.66; 'here': 0.66; 'reply': 0.66; 'minutes': 0.67; 'side': 0.67; 'benefit': 0.68; 'email addr:python.org"': 0.68; 'equals': 0.68; 'upper': 0.74; 'hand': 0.80; 'trial': 0.83; 'individual.': 0.84; 'time)': 0.91; 'whereas': 0.91; 'scott': 0.93
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:to :content-type; bh=3P6EZRm0+Hi8//LwfQCqg1ChXyw5uAAbOC9EtIGO92g=; b=QzwWn0pcexzGInuBXm3DomiVurhNEIYUoGtpIz0i4HcMuQYJKiqYyADC+n/LL/hhSa H86IriAqu9AcLaNkeMymnxxY0/bAKXWok7K9zM7J0p7H1p5RS93kLq/eX6HgvQWzmtlQ 7bIonbzKVGYbM7+JiKmlf9uOEaCNIVpfkYgTEnerLgsEO534sSCob/5CrSnnffL9+MqR mjIuFoxf/vNaO+EEBoORdhrhRBfQWfS4sSDSuaZUz5nbsvzvf5LBsE1jL/O0cDjR10QU vhQV0VdTX+VKgswb6v1jrpA0mW8EtIasLZuyMp//jbIvQrmCyFA9j6igdf4YnM9u8Io7 3lZg==
MIME-Version 1.0
X-Received by 10.220.191.134 with SMTP id dm6mr19147211vcb.16.1391224678401; Fri, 31 Jan 2014 19:17:58 -0800 (PST)
In-Reply-To <CAPTjJmpVVPLo1tDuG-FLAz95uDSPq-Ev0SAkVzkE6Mhxhfy+Hw@mail.gmail.com>
References <02c4c69d-71f1-4a01-86df-d4d5a7ffb3f5@googlegroups.com> <mailman.6195.1391146214.18130.python-list@python.org> <8da5d692-1446-4107-9a5a-5efd91f7c051@googlegroups.com> <bl14h8F21ooU1@mid.individual.net> <ECA63796-AAAE-484E-AF00-7B1B4AE66A3A@cox.net> <2B1086E7-5E5F-4227-8F9E-92A37D2DE1D2@cox.net> <CAPTjJmpVVPLo1tDuG-FLAz95uDSPq-Ev0SAkVzkE6Mhxhfy+Hw@mail.gmail.com>
Date Sat, 1 Feb 2014 14:17:58 +1100
Subject Re: Help with some python homework...
From David <bouncingcats@gmail.com>
To "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-Mailman-Approved-At Sat, 01 Feb 2014 06:32:59 +0100
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.6256.1391232780.18130.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391232780 news.xs4all.nl 2903 [2001:888:2000:d::a6]:40182
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65185

Show key headers only | View raw


On 1 February 2014 12:34, Chris Angelico <rosuav@gmail.com> wrote:
> On Sat, Feb 1, 2014 at 12:14 PM, Scott W Dunning <swdunning@cox.net> wrote:
>
>> Also, I think I found out through a little trial and error that I had two different hours, mins, and sec so I had to use one uppercase and one lower case.  Is that frowned upon?  And should I have come up with a different name instead?
>>
>> SECONDS = 1
>> MINUTES = 60 * SECONDS
>> HOURS = 60 * MINUTES

What is actually being defined here are constants to be used for
scaling or conversion of some quantity (a time) into different units.
So in this situation would I define the conversion constant with an
upper case name like this:

  SECONDS_PER_MINUTE = 60

and I would use it like this

   seconds = minutes * SECONDS_PER_MINUTE

where "seconds" and "minutes" are the names holding the numeric data.

That line has the extra benefit that it is clear to me why the units
are seconds on both sides of the equals sign (because on the right
hand side the minute-units cancel thus: m*s/m=s), whereas this is much
less clear to me in Scott's line.

Scott's message quoted above did not reach me, only Chris's quote of
it, so I say: Scott once you begin a discussion on a mailing list like
this one, please make sure that every reply you make goes to
"python-list@python.org" and not to the individual. That way we can
all participate in the discussion, that is best for everyone
especially you.

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


Thread

Help with some python homework... scottwd80@gmail.com - 2014-01-30 21:12 -0800
  Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 16:30 +1100
    Re: Help with some python homework... sjud9227 <scottwd80@gmail.com> - 2014-01-30 22:24 -0800
      Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 17:38 +1100
        Re: Help with some python homework... sjud9227 <scottwd80@gmail.com> - 2014-01-30 22:48 -0800
      Re: Help with some python homework... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-31 21:17 +1300
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 19:30 +1100
          Re: Help with some python homework... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-31 23:46 +1300
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-02-01 11:57 +1100
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-02-01 12:34 +1100
        Re: Help with some python homework... David <bouncingcats@gmail.com> - 2014-02-01 14:17 +1100
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 18:14 -0700
          Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 19:32 +0000
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 17:12 -0800
              Re: Help with some python homework... Larry Hudson <orgnut@yahoo.com> - 2014-02-02 23:48 -0800
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:46 -0700
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:42 -0700
        Re: Help with some python homework... David <bouncingcats@gmail.com> - 2014-02-01 17:13 +1100
        Re: Help with some python homework... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-01 10:44 -0500
  Re: Help with some python homework... Neil Cerutti <neilc@norwich.edu> - 2014-01-31 13:51 +0000
  Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 03:02 +0000
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:35 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:18 -0700
    Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 19:45 +0000
    Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:11 -0800
      Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:36 -0800
      Re: Help with some python homework... MRAB <python@mrabarnett.plus.com> - 2014-02-02 16:38 +0000
        Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:57 -0800
          Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-02 17:43 +0000
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 10:09 -0800
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 11:08 -0800
              Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 11:21 -0800
    Re: Help with some python homework... "Rhodri James" <rhodri@wildebst.org.uk> - 2014-02-02 17:15 +0000
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:04 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:07 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:19 -0700
  Re: Help with some python homework... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-01 10:50 -0500
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-02-01 23:06 -0700

csiph-web