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


Groups > comp.lang.python > #95456

Re: why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <random832@fastmail.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'cpython': 0.05; 'testing,': 0.05; 'false,': 0.07; 'wrapper': 0.07; 'received:internal': 0.09; 'subject:why': 0.09; 'python.': 0.11; '2.7': 0.13; 'message-id:@webmail.messagingengine.com': 0.16; 'read:': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'subject:)?': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'aug': 0.20; 'machine': 0.21; 'object.': 0.22; 'appears': 0.23; 'this:': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'skip:m 30': 0.27; 'values': 0.28; 'that.': 0.30; 'supposed': 0.31; 'fixed': 0.31; 'class': 0.33; 'that,': 0.34; 'false': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'method': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'some': 0.40; 'from:no real name:2**0': 0.60; 'your': 0.60; 'header:Message-Id:1': 0.61; 'email addr:gmail.com': 0.62; 'believe': 0.66
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=uQhxYVNxVeDtck8/75W+Lwh4AWs=; b=laCVq2 0XPP+1gh081IqMi8vNW3XpV5A9W1lPTo6SR2ixbnP0nFiMRacwQHDyz1+eI4jVuQ Bi9f1cF45UxIG3dpRN2oPIlLrgY1QracteKoYJsadz5+reXHqdBToq1ycBxy2D0N eIobbawNbzZEkHkNMamDnwQ+nHjc62uDg55O0=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=uQhxYVNxVeDtck8 /75W+Lwh4AWs=; b=RrT9Y5G371dnzOoheDjTsdwnjh5ZnkqIQbbw/PJ3qvOy4yF UxsWuoslcwWY/hUJs3asamQz77IJMIJAiDaC8iRw8pi0cZdWh2iUEIghCmOrvOzp FafTooPPBpxtYMkt9XVzGO14Ex9YWbmU6YxW+ec1G1yMx5A95CGw4voSV/Bk=
X-Sasl-Enc OjwrdOzazdC94eg7ioSQUhjo2iXhDJF6q5v/EGtH6emv 1439871119
From random832@fastmail.us
To python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-4fee8ba5
Subject Re: why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)?
Date Tue, 18 Aug 2015 00:11:59 -0400
In-Reply-To <f45a1172-03e2-4bb2-8045-8252843d9cdf@googlegroups.com>
References <dbbdd7bd-63e7-42cb-96d5-523606380bed@googlegroups.com> <f45a1172-03e2-4bb2-8045-8252843d9cdf@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.71.1439871122.4764.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1439871122 news.xs4all.nl 16594 [2001:888:2000:d::a6]:56327
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95456

Show key headers only | View raw


On Mon, Aug 17, 2015, at 18:25, alex.flint@gmail.com wrote:
> Sorry I completely mistype that. It was supposed to read:
> 
> >>> id(multiprocessing.Process.is_alive) == id(multiprocessing.Process.start)
> True
> 
> >>> multiprocessing.Process.is_alive is multiprocessing.Process.start
> False

Try this:
is_alive = multiprocessing.Process.is_alive
start = multiprocessing.Process.start
id(is_alive) == id(start)

If (as I believe it will) this ends up being false, this shows that it's
an issue of object lifespan with the values of the expression being
temporary method wrappers. From some testing, on my machine on CPython
2.7 this appears to work for any method of any class written in python.
While you fixed the typo, it is instructive to note that, as in your
original example, multiprocessing.Process.start is
multiprocessing.Process.start is *also* False, which would not be the
case if the method wrapper were a permanent object.

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


Thread

why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)? alex.flint@gmail.com - 2015-08-17 15:23 -0700
  Re: why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)? alex.flint@gmail.com - 2015-08-17 15:25 -0700
    Re: why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)? Ian Kelly <ian.g.kelly@gmail.com> - 2015-08-17 17:11 -0600
    Re: why does id(multiprocessing.Process.start) == id(multiprocessing.Process.start)? random832@fastmail.us - 2015-08-18 00:11 -0400

csiph-web