[Tutor] Using a dict value in the same dict

Brett Ritter swiftone at swiftone.org
Tue Jul 5 22:01:47 CEST 2011


On Tue, Jul 5, 2011 at 3:40 PM, Walter Prins <wprins at gmail.com> wrote:
>> So the trick is to define the dictionary in separate sessions, not at
>> once.
>
> What do you mean, "seperate sessions, not at once"?

He means you can't say:

d = {a: "1", b: d["a"]}

Which is correct.  To set one value based on another they must be set
separately.

-- 
Brett Ritter / SwiftOne
swiftone at swiftone.org


More information about the Tutor mailing list