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 -- https://mail.python.org/mailman/listinfo/python-list