Finding the instance reference of an object

Aaron "Castironpi" Brady castironpi at gmail.com
Fri Oct 17 15:03:50 EDT 2008


On Oct 17, 10:56 am, Joe Strout <j... at strout.net> wrote:
> On Oct 16, 2008, at 11:23 PM, Dennis Lee Bieber wrote:
snip
> >    But, it seems, you are the only one arguing that "the semantics are
> > all the same"... Doesn't that suggest that they aren't the same?
>
> No, it suggests to me that there's a lot of confusion in the Python  
> community.  :)  It appears as though people either (a) really want to  
> think that Python's object handling is special and unique for  
> emotional reasons, or (b) are comparing it to really ancient languages  
> that didn't have any notion of objects and object references.  This  
> has led to making up new terminology and spreading confusion.  I'm  
> coming back to Python from almost a decade of working with other  
> modern languages (including implementing the compiler for one of  
> them), and I don't see any difference at all between Python's object  
> handling and those.
>
> Best,
> - Joe

I'm not fluent in Java so you'll have to be the judge.

In Python:

b= 0
f( b )

No matter what, b == 0.  C doesn't guarantee this.  Does Java?

Further:

b= {}
c= b
f( b )

No matter what, 'c is b' is true.  C doesn't have an 'is' operator.
Does Java?

Lastly, the word 'same' is ambiguous or poorly defined.  It can mean
either 'identical' or 'equal'.



More information about the Python-list mailing list