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


Groups > comp.lang.python > #52800

Re: Basic Python Query

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <fabiosantosart@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'class,': 0.07; 'cc:addr:python-list': 0.11; 'thread': 0.14; '*always*': 0.16; 'curious.': 0.16; 'eckhardt': 0.16; 'subject:Query': 0.16; 'thread,': 0.16; 'threads.': 0.16; 'wrote:': 0.18; 'aug': 0.22; 'handles': 0.22; 'cc:addr:python.org': 0.22; 'file.': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'said,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; 'file': 0.32; 'run': 0.32; 'quite': 0.32; 'running': 0.33; 'actual': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'doing': 0.36; 'represent': 0.38; 'skip:& 10': 0.38; 'problems': 0.38; 'does': 0.39; 'most': 0.60; 'tell': 0.60; 'new': 0.61; 'simple': 0.61; 'clearer': 0.84; 'huh?': 0.84; '2013': 0.98
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 :cc:content-type; bh=3QzIosw7DPBQifzV0v2gnqdjilxXcOyYAe8bKP00em8=; b=El2sx+AVE8Ohrx21BQVu9iVCkqCLP10p1ZnHT/HKArQaqgLCeZZrolGRXK2c8ItBre SP711DYecb7LvVFk6QZJaR0n1vl094HK1Ol4EXWlt3R8BHcudUi6IQfMzd82UgU7PCEO HpF4t8i1JKVBHNXbyo1WvQYX5FxFX8gng6sANyKvEM8DUzqja3IZSo30alDoUppYJhwQ i3V5YOXbdnPF23MKG++eI22ZJI43VJXzElhFeTZaSmlRcmAgtjz0O3/rYuB2bNwmQPcg IWI3VbBmykOJ7KliolQFBUrLaTvxTL+0XWz5FQQ90ixOKyROR+GUhP0x5z59jYp/e1fq 7u3w==
MIME-Version 1.0
X-Received by 10.224.156.197 with SMTP id y5mr13483514qaw.83.1377125457079; Wed, 21 Aug 2013 15:50:57 -0700 (PDT)
In-Reply-To <kv32q9$rd2$1@news.albasani.net>
References <mailman.68.1377067974.19984.python-list@python.org> <nqceea-aae.ln1@satorlaser.homedns.org> <kv32q9$rd2$1@news.albasani.net>
Date Wed, 21 Aug 2013 23:50:56 +0100
Subject Re: Basic Python Query
From Fábio Santos <fabiosantosart@gmail.com>
To Johannes Bauer <dfnsonfsduifb@gmx.de>
Content-Type multipart/alternative; boundary=089e01537592ae31c404e47d01a6
Cc python-list@python.org
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.110.1377125778.19984.python-list@python.org> (permalink)
Lines 68
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1377125778 news.xs4all.nl 15866 [2001:888:2000:d::a6]:32799
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52800

Show key headers only | View raw


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

On 21 Aug 2013 20:07, "Johannes Bauer" <dfnsonfsduifb@gmx.de> wrote:
>
> On 21.08.2013 11:11, Ulrich Eckhardt wrote:
>
> > That said, there is never a need for deriving
> > from the Thread class, you can also use it to run a function without
> > that. That way is IMHO clearer because the threading.Thread instance is
> > not the thread, just like a File instance is not a file. Both just
> > represent handles for manipulating the actual thing.
>
> Huh? That I find most curious.
>
> I *always* derive from threading.Thread and really like the way that
> thread setup works (instanciate Thread handle, call start). Very
> intuitive, never had the problems with clarity that you mentioned. Could
> you elaborate on your suggestion? I don't seem to quite get it I'm afraid.
>
> Best regards,
> Johannes

I cannot tell whether you are trolling or are just new to this, but you
don't always have to use threads. You use threads when you need multiple
parts of your program running concurrently. Don't inherit Thread if all you
are doing is a simple object with state, nor if your program does not need
concurrency.

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


Thread

Basic Python Query chandan kumar <chandan_psr@yahoo.co.in> - 2013-08-21 14:50 +0800
  Re: Basic Python Query Steven D'Aprano <steve@pearwood.info> - 2013-08-21 08:19 +0000
  Re: Basic Python Query Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-08-21 11:11 +0200
    Re: Basic Python Query Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-08-21 20:58 +0200
      Re: Basic Python Query Fábio Santos <fabiosantosart@gmail.com> - 2013-08-21 23:50 +0100
        Re: Basic Python Query Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-08-22 10:49 +0200
      Re: Basic Python Query Ned Batchelder <ned@nedbatchelder.com> - 2013-08-21 20:06 -0400
        Re: Basic Python Query Bob Martin <bob.martin@excite.com> - 2013-08-22 06:43 +0100
          Re: Basic Python Query Ned Batchelder <ned@nedbatchelder.com> - 2013-08-22 09:45 -0400
            Re: Basic Python Query Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-23 03:12 +0000
          Re: Basic Python Query random832@fastmail.us - 2013-08-22 14:57 -0400
          Re: Basic Python Query Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-08-22 18:22 -0400
          Re: Basic Python Query random832@fastmail.us - 2013-08-23 01:08 -0400
        Re: Basic Python Query Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-08-22 10:50 +0200
      Re: Basic Python Query Fábio Santos <fabiosantosart@gmail.com> - 2013-08-22 09:46 +0100
      Re: Basic Python Query Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-08-22 13:54 +0200
        Re: Basic Python Query Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-23 03:28 +0000
          Re: Basic Python Query Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2013-08-23 09:12 +0200
            Re: Basic Python Query Chris Angelico <rosuav@gmail.com> - 2013-08-24 01:50 +1000

csiph-web