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


Groups > comp.lang.python > #73901

Re: OOP with MyTime

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.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.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'def': 0.12; 'code?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:OOP': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; "i've": 0.25; 'define': 0.26; 'this:': 0.26; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'class': 0.32; 'run': 0.32; 'subject:with': 0.35; 'received:google.com': 0.35; 'pm,': 0.38; 'how': 0.40; 'gotten': 0.74; 'jul': 0.74; '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=YeKuiPgogXHp4l29dtF5JE2dW1v50A2L59BTA48SYoI=; b=X9AC2AsGQD11flQXZhqKECSOEwC79Nbq316v4NpiTYguzEN3L9orStVqkgtCFM+rKM YSl9Wi7yncVTZ36CAqA9tVxODQLs/z65DkYotcRGuhlGQlj1AazdkpwLW4OpBut5aRkq yNn4Y6iulhVXzMrPVQYF9EhWCu26FwF+jFJK9dh0E196YGJAITfVRlmtu0QZcW0ILVbR GGSRFaYoS4nU3DM3HPyD4FLgXmmuOl7748G3JDFGsyMG/Eqv0zRI6O6cPWwAvJ17NHyC 8stOOncEsRlUmbau8SkkJ7b8C45PdlA+Deja7MAyvsFmc00lhWYQdEPyKwG2cKHdTG9q vX2A==
MIME-Version 1.0
X-Received by 10.52.166.71 with SMTP id ze7mr192392vdb.69.1404392469488; Thu, 03 Jul 2014 06:01:09 -0700 (PDT)
In-Reply-To <fd30a5f9-c446-435a-9f0a-74dd2d608c5c@googlegroups.com>
References <7020a5d8-96a9-4fa4-8e69-4c7593dedee3@googlegroups.com> <mailman.11418.1404331330.18130.python-list@python.org> <fd30a5f9-c446-435a-9f0a-74dd2d608c5c@googlegroups.com>
Date Thu, 3 Jul 2014 23:01:09 +1000
Subject Re: OOP with MyTime
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.11457.1404392478.18130.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404392478 news.xs4all.nl 2916 [2001:888:2000:d::a6]:41246
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73901

Show key headers only | View raw


On Thu, Jul 3, 2014 at 10:51 PM,  <kjakupak@gmail.com> wrote:
> So I've now gotten this:
> class MyTime:
>     def between(self, t1, t2):
>         return (t1.hours, t1.minutes, t1.seconds) <= (self.hours, self.minutes, self.seconds) and (self.hours, self.minutes, self.seconds) <= (t2.hours, t2.minutes, t2.seconds)
> print("between(t2, t3, t1) =", between(t2, t3, t1))

And what happens when you run this code? A NameError, I would expect.
Do you understand how to define and call methods?

ChrisA

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


Thread

OOP with MyTime kjakupak@gmail.com - 2014-07-02 12:20 -0700
  Re: OOP with MyTime Akira Li <4kir4.1i@gmail.com> - 2014-07-02 23:45 +0400
  Re: OOP with MyTime MRAB <python@mrabarnett.plus.com> - 2014-07-02 21:02 +0100
    Re: OOP with MyTime kjakupak@gmail.com - 2014-07-03 05:51 -0700
      Re: OOP with MyTime Chris Angelico <rosuav@gmail.com> - 2014-07-03 23:01 +1000
        Re: OOP with MyTime kjakupak@gmail.com - 2014-07-03 06:08 -0700
          Re: OOP with MyTime Chris Angelico <rosuav@gmail.com> - 2014-07-03 23:17 +1000
      Re: OOP with MyTime MRAB <python@mrabarnett.plus.com> - 2014-07-03 14:11 +0100
        Re: OOP with MyTime kjakupak@gmail.com - 2014-07-03 08:21 -0700
          Re: OOP with MyTime Chris Angelico <rosuav@gmail.com> - 2014-07-04 01:35 +1000
          Re: OOP with MyTime Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-07-03 17:23 +0100

csiph-web