On 05/03/2014 06:10, Rustom Mody wrote:
On Wednesday, March 5, 2014 11:31:04 AM UTC+5:30, alex23 wrote:
On 5/03/2014 3:47 PM, Rustom Mody wrote:
That python is a hll means that machine reprs are intended to be abstracted
away. 'is' fails to do that -- proof of that being the discrepancy between
is and ==
The "discrepancy" is because _they're fundamentally different_:
Yeah I know :D
Both have their uses.
Yes -- see my lisp example above
>>> a = b = [1,2]
>>> c = [1,2]
>>> a is b
True
>>> a is c
False
>>> a == b
True
>>> a == c
True
`==` is used to determine if they're equivalent in value.
Right
`is` is used to determine if two names refer to the same object.
'Same' is 'is' in a different guise and is what I object to.
A python programmer who needs/wants to think of same/is in this sense
should probably be using C or assembly
In the exceptional circumstances when 'low-level-machine-equivalence-relation'
is desired, a name carrying some of those connotations would be ok
Quite frankly I haven't got the faintest idea what you're going on
about, so I'll just stick with writing plain, boring, working Python code.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com
--
https://mail.python.org/mailman/listinfo/python-list