IsString

Tom Anderson twic at urchin.earth.li
Tue Dec 13 10:28:32 EST 2005


On Tue, 13 Dec 2005, Steven D'Aprano wrote:

> On Mon, 12 Dec 2005 18:51:36 -0600, Larry Bates wrote:
>
> [snippidy-doo-dah]
>
>> I had the same thought, but reread the post.  He asks "if a given 
>> variable is a character or a number".  I figured that even if he is 
>> coming from another language he knows the difference between "a given 
>> variable" and the "contents of a give variable".  I guess we will 
>> see.... ;-).  This list is so good, he gets BOTH questions answered.
>
> The problem is, Python doesn't have variables (although it is 
> oh-so-tempting to use the word, I sometimes do myself). It has names in 
> namespaces, and objects.

In what sense are the names-bound-to-references-to-objects not variables?

> It be a subtle difference, but an important one.

No, it's just spin, bizarre spin for which i can see no reason. Python has 
variables.

> That's why, for instance, Python is neither call by reference nor call 
> by value, it is call by object.

No, python is call by value, and it happens that all values are pointers. 
Just like java, but without the primitive types, and like LISP, and like a 
load of other languages. Python's parameter passing is NO DIFFERENT to 
that in those languages, and those languages are ALL described as 
call-by-value, so to claim that python does not use call-by-reference but 
some random new 'call-by-object' convention is incorrect, unneccessary, 
confusing and silly.

</rant>

I'm sure this has been argued over many times here, and we still 
all have our different ideas, so please just ignore this post!

tom

-- 
So the moon is approximately 24 toasters from Scunthorpe.



More information about the Python-list mailing list