Counterintuitive Python behavior

brueckd at tbye.com brueckd at tbye.com
Wed Apr 17 10:55:57 EDT 2002


On Wed, 17 Apr 2002, Michael Hudson wrote:

> It's you :) As I can't read my email at the moment[1], I have no
> better way of wasting my time to hand than drawing you some ascii art.
[snip]

This is a great explanation! The next time a co-worker asks a
assignment/binding/references question I'm going to refer them to this
message. Thanks for writing this!

[snip]
>                                                     +---+
>     ,------.       +-------+                     ,->| 1 |
>     | dict |------>|+-----+|             +-----+ |  +---+
>     `------'       || "a" |+------------>| [0]-+-'
>                    |+-----+|             | [1]-+-.
>                    |+-----+|             +-----+ |  +---+
>                    || "b" |+-----.         /\    `->| 3 |
>                    |+-----+|     |    ,----'        +---+
>                    +-------+     |    |
>                                  `----+-----.
>     ,------.       +-----+            |     \/
>     | list |------>| [0]-+------------'   +-----+   +---+
>     `------'       | [1]-+--------------->| [0]-+-->| 2 |
>                    +-----+                +-----+   +---+

(sorry for reposting this, but it was too cool to snip)

-Dave






More information about the Python-list mailing list