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


Groups > comp.lang.python > #62456

Re: Newbie question. Are those different objects ?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.019
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'assignment': 0.07; 'assuming': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.12; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:question.': 0.16; 'subject:those': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'print': 0.22; 'header:User-Agent:1': 0.23; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "i'm": 0.30; 'code': 0.31; 'posting': 0.31; 'object.': 0.31; 'objects': 0.35; 'starting': 0.37; 'depends': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'received:173': 0.61; 'first': 0.61; 'name': 0.63; 'different': 0.65; 'subject:. ': 0.67; 'to,': 0.72; 'forced': 0.84; 'received:fios.verizon.net': 0.84; 'same,': 0.91; 'subject:Are': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Newbie question. Are those different objects ?
Date Fri, 20 Dec 2013 16:56:10 -0500
References <af844bcf-ed55-42da-8a9f-b8270dcc4028@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-254-207.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
In-Reply-To <af844bcf-ed55-42da-8a9f-b8270dcc4028@googlegroups.com>
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.4445.1387576587.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387576587 news.xs4all.nl 2942 [2001:888:2000:d::a6]:59317
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62456

Show key headers only | View raw


On 12/20/2013 10:16 AM, dec135@msn.com wrote:
> y = raw_input('Enter a number:')
> print type y
> y = float(raw_input('Enter a number:'))
> print type y

I recommend starting with 3.3 unless your are forced to use 2.x.
I also recommend trying code before posting it.

> I'm assuming that y is an object.

The name 'y' is bound to an object. The second assignment rebinds 'y' to 
a different object.

> I'm also assuming that the second and the first y are different objects

It depends on whether by 'y' you mean the name, which remains the same, 
or the object it is bound to, which changes.


-- 
Terry Jan Reedy

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


Thread

Newbie question. Are those different objects ? dec135@msn.com - 2013-12-20 07:16 -0800
  Re: Newbie question. Are those different objects ? random832@fastmail.us - 2013-12-20 10:24 -0500
  Re: Newbie question. Are those different objects ? rusi <rustompmody@gmail.com> - 2013-12-20 07:34 -0800
    Re: Newbie question. Are those different objects ? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-20 16:00 +0000
      Re: Newbie question. Are those different objects ? rusi <rustompmody@gmail.com> - 2013-12-20 09:10 -0800
        Re: Newbie question. Are those different objects ? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-20 17:29 +0000
        Re: Newbie question. Are those different objects ? 88888 Dihedral <dihedral88888@gmail.com> - 2013-12-20 09:59 -0800
        Re: Newbie question. Are those different objects ? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-12-21 10:56 +1300
          Re: Newbie question. Are those different objects ? Duncan Booth <duncan.booth@invalid.invalid> - 2013-12-23 08:19 +0000
      Re: Newbie question. Are those different objects ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-21 12:58 +0000
        Re: Newbie question. Are those different objects ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-12-21 11:54 -0500
        Re: Newbie question. Are those different objects ? Chris Angelico <rosuav@gmail.com> - 2013-12-22 05:39 +1100
        Re: Newbie question. Are those different objects ? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-21 19:17 +0000
      Re: Newbie question. Are those different objects ? alex23 <wuwei23@gmail.com> - 2013-12-23 11:31 +1000
    Re: Newbie question. Are those different objects ? Travis Griggs <travisgriggs@gmail.com> - 2013-12-20 10:24 -0800
  Re: Newbie question. Are those different objects ? bob gailer <bgailer@gmail.com> - 2013-12-20 12:02 -0500
  Re: Newbie question. Are those different objects ? rurpy@yahoo.com - 2013-12-20 10:06 -0800
  Re: Newbie question. Are those different objects ? Terry Reedy <tjreedy@udel.edu> - 2013-12-20 16:56 -0500
  Re: Newbie question. Are those different objects ? Gene Heskett <gheskett@wdtv.com> - 2013-12-21 14:08 -0500

csiph-web