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 different objects because they have different types.
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 a PEP asking for a language change which
requires that that stupid = sign is replaced by a keyword reading
something like
thenameonthelefthandsideisassignedtheobjectontherighthandside ?
Lets unassume that and rewrite the code
1. y ! raw_input('Enter a number:')
2. print type y
3. y ! float(raw_input('Enter a number:'))
4. print type y
Now read that 1 as first, 2 as second etc and read the '!' as 'MAKE'.
(It may help to shout it)
Now what was your question?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
--
https://mail.python.org/mailman/listinfo/python-list