On Dec 3, 2007, at 9:43 PM, Ed Leafe wrote:

>       I don't know why the authors of your book chose to use the term
> 'variable'. It is generally frowned upon in Python, as it means
> something quite different in most languages.

        Here's another example that will usually trip up Python n00bs who  
expect names to work as variables in other languages do:

x = [1,2,3]
y = x
x[1] = 4
print x         # [1, 4, 3]
print y         # [1, 4, 3]

x = [1,2,3]
y = x
x = [1,4,3]
print x         # [1, 4, 3]
print y         # [1, 2, 3]


-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to