Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > noob question

Thread Tools

noob question

Posts: n/a
Steven D'Aprano <(E-Mail Removed)> wrote in message news:<pan.2005.>...

> Can anyone think of some good, easy to understand examples of where
> Python's name/object model differs from the variable/value model?

a = b = [ 1 ]

a and b are _not_ two variables, each with [ 1 ] as value, but just two
names for the same object (a list). In other variable-based languages,
the above is equivalent to:

a = [ 1 ]
b = [ 1 ]

in Python it is not.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Here a noob, there a noob.... JimDoire MCSE 0 04-10-2008 07:23 PM
Noob question Thomas F. Miller Cisco 1 06-08-2005 07:41 PM
Noob question Ferny Wireless Networking 6 07-20-2004 12:41 AM
something of a noob question NewsHound Perl 1 06-30-2004 06:47 PM
[VHDL] a testbench question (bringing out states) - noob Yttrium VHDL 7 10-15-2003 06:03 PM