Re: Newbie question. Are those different objects ?

2013-12-23 Thread Duncan Booth
Gregory Ewing wrote: > rusi wrote: >> Good idea. Only you were beaten to it by about 2 decades. > > More than 2, I think. > > Algol: x := y Wher := is pronounced 'becomes'. -- Duncan Booth http://kupuguy.blogspot.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question. Are those different objects ?

2013-12-22 Thread alex23
On 21/12/2013 2:00 AM, Mark Lawrence wrote: Shall I write a PEP asking for a language change which requires that that stupid = sign is replaced by a keyword reading something like thenameonthelefthandsideisassignedtheobjectontherighthandside ? I propose: tag with -- https://mail.python.o

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Gene Heskett
On Saturday 21 December 2013 14:08:02 Chris Angelico did opine: > On Sun, Dec 22, 2013 at 3:54 AM, Dennis Lee Bieber > > wrote: > > (heh, the spell-checker suggests that > > "thefullyqualifiednameontheleftafteranysubexpressionshavebeenevaluated > > isattachedt" should be replaced with "textually

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Mark Lawrence
On 21/12/2013 16:54, Dennis Lee Bieber wrote: On 21 Dec 2013 12:58:41 GMT, Steven D'Aprano declaimed the following: On Fri, 20 Dec 2013 16:00:22 +, Mark Lawrence wrote: On 20/12/2013 15:34, rusi wrote: You are also assuming that the two horizontal lines sometimes called 'equals' have

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Chris Angelico
On Sun, Dec 22, 2013 at 3:54 AM, Dennis Lee Bieber wrote: > (heh, the spell-checker suggests that > "thefullyqualifiednameontheleftafteranysubexpressionshavebeenevaluatedisattachedt" > should be replaced with "textually") The spell-checker was scratching its head and going "I'm pretty sure this i

Re: Newbie question. Are those different objects ?

2013-12-21 Thread Steven D'Aprano
On Fri, 20 Dec 2013 16:00:22 +, Mark Lawrence wrote: > On 20/12/2013 15:34, rusi wrote: >> You are also assuming that the two horizontal lines sometimes called >> 'equals' have something to do with something called by the same name in >> math -- equations >> >> > A good point. Shall I write

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Gregory Ewing
rusi wrote: Good idea. Only you were beaten to it by about 2 decades. More than 2, I think. Lisp: (setq x y) Algol: x := y Smalltalk: x <- y (where <- is a "left arrow" character) Cobol: MOVE X TO Y -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Terry Reedy
On 12/20/2013 10:16 AM, dec...@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.

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Travis Griggs
On Dec 20, 2013, at 8:00 AM, Mark Lawrence wrote: > A good point. Shall I write a PEP asking for a language change which > requires that that stupid = sign is replaced by a keyword reading something > like thenameonthelefthandsideisassignedtheobjectontherighthandside ? Or a symbol like :=. As

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rurpy
On 12/20/2013 08:16 AM, dec...@msn.com wrote: > y = raw_input('Enter a number:') > print type y > y = float(raw_input('Enter a number:')) > print type y > > I'm assuming that y is an object. Rather than thinking that y "is" an object, it is more accurate to think of it as: y is a name that is "bo

Re: Newbie question. Are those different objects ?

2013-12-20 Thread 88888 Dihedral
On Saturday, December 21, 2013 1:10:37 AM UTC+8, rusi wrote: > On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: > > > On 20/12/2013 15:34, rusi wrote: > > > > On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > > > >> y = raw_input('Enter a number:') >

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Mark Lawrence
On 20/12/2013 17:10, rusi wrote: On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: On 20/12/2013 15:34, rusi wrote: On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:'))

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rusi
On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: > On 20/12/2013 15:34, rusi wrote: > > On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > >> y = raw_input('Enter a number:') > >> print type y > >> y = float(raw_input('Enter a number:')) > >> print type

Re: Newbie question. Are those different objects ?

2013-12-20 Thread bob gailer
On 12/20/2013 10:16 AM, dec...@msn.com wrote: print type y That line will give you a syntax error. -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Mark Lawrence
On 20/12/2013 15:34, rusi wrote: On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:')) print type y I'm assuming that y is an object. I'm also assuming that the second and the first y are

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rusi
On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > y = raw_input('Enter a number:') > print type y > y = float(raw_input('Enter a number:')) > print type y > I'm assuming that y is an object. I'm also assuming that the second and the > first y are different objects because

Re: Newbie question. Are those different objects ?

2013-12-20 Thread random832
On Fri, Dec 20, 2013, at 10:16, dec...@msn.com wrote: > The second time we type print type y, how does the program knows which > one of the y's it refers to ? Is the first y object deleted ? y does not refer to the first object anymore after you've assigned the second object to it. In CPython, if

Newbie question. Are those different objects ?

2013-12-20 Thread dec135
y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:')) print type y I'm assuming that y is an object. I'm also assuming that the second and the first y are different objects because they have different types. The second time we type print type y, how does the progra