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


Groups > comp.lang.python > #65708 > unrolled thread

Re: Python 2.7.6 help with modules

Started byScott W Dunning <swdunning@cox.net>
First post2014-02-08 19:07 -0700
Last post2014-02-08 19:07 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python 2.7.6 help with modules Scott W Dunning <swdunning@cox.net> - 2014-02-08 19:07 -0700

#65708 — Re: Python 2.7.6 help with modules

FromScott W Dunning <swdunning@cox.net>
Date2014-02-08 19:07 -0700
SubjectRe: Python 2.7.6 help with modules
Message-ID<mailman.6559.1391911642.18130.python-list@python.org>

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

On Feb 8, 2014, at 6:46 PM, Chris Angelico <rosuav@gmail.com> wrote:
> No, I'm not a teacher by profession, but I was homeschooled, and since
> I'm the second of seven children [1], I got used to teaching things to
> my siblings. Also, every week I run a Dungeons and Dragons campaign
> online, which requires similar skills. (Teaching maths is way easier
> than getting my players to figure out some puzzles.
Well, you’re very good at it!  Like I said I like that you don’t just give me the answer you help me figure it out which is what I need.  

> I had no idea
> that, in a group of half a dozen nerds, nobody would recognize this
> broken text: "In brightest day, in blackest night / No evil ......
> sight / Let .... worship .... mi.... / .... my power .... tern...." -
> I'd have thought the first line alone would be enough for anyone who's
> at least mildly nerdy and/or geeky.)
Green Lantern oath right?  

> 
> (We start in fifteen minutes. Want to come watch? Just telnet to
> minstrelhall.com port 221!)

Awesome, I may stop by and check it out.  
> 
> That's certainly effective. It's going to give you the right result. I
> would be inclined to start from the small end and strip off the
> seconds first, then the minutes, etc, because then you're working with
> smaller divisors (60, 60, 24, 7 instead of 604800, 86400, 3600, 60);
> most people will understand that a week is 7 days, but only people who
> work with DNS will know that it's 604800 seconds. But both work.

Yeah I had to look up how many seconds were in weeks and days.

> 
> You'll also note that you're trimming off bits and leaving "residual
> seconds". I would put all the "_rem" values back into "seconds", which
> would let you use augmented assignment:

Not sure what augmented assignments are but I’ll look that up.  I’m gonna try and figure it out that way also just for the heck of it.  
> 
> weeks = seconds/604800
> seconds %= 604800

Is the ->  seconds %= 604800 
Saying ->  seconds = seconds % 604800?


> days = seconds / 86400
> seconds %= 86400
> hours = seconds / 3600
> seconds %= 3600
> minutes = seconds / 60
> seconds %= 60
> 
> 
> [1] Our father's not a captain, but there's still nothing about being
> a non-captain with seven children. And that movie is definitely one of
> our favorite things.

Seven children is a lot.  It definitely takes a Captain to raise seven children.  : )

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web