Troubles with global variables
Dale Strickland-Clark
dale at riverhall.NOSPAMco.uk
Tue Oct 16 09:03:51 EDT 2001
Jeremy Whetzel <lists at toadmail.com> wrote:
>Dale Strickland-Clark <dale at riverhall.NOSPAMco.uk> writes:
>
>> >eo = [['E',') Encoder: ','chooseenc()',enc],
>> > ['B',') Bitrate: ','choosebr()',br]]
>>
>> ^^^^
>> Your problem, I think, is here.
>>
>> The values of enc and br are taken at the time eo is built. If you
>> want new values, you will need to re-assign eo or use an alternative
>> approach.
>
>Hmmmm... sometimes being a newbie can really be a pain. I hate to ask
>this, but how does one "re-assign" eo?
>
>Jeremy
Put the 'eo = ...' statement somewhere between the asignment to enc/br
and where you next refer to it.
--
Dale Strickland-Clark
Riverhall Systems Ltd
More information about the Python-list
mailing list