a wrote:
> i understand index error
> but there is no index error in my code that is the problem!
so who wrote the "c:\mark\web1\code.py" file ?
> > File "c:\mark\web1\code.py", line 64, in GET
> > l_code.append( len(d_list_code[i]['entries']) )
> > IndexError: list index out of range
m
i understand index error
but there is no index error in my code that is the problem!
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, a wrote:
>
> > Traceback (most recent call last):
> > File "C:\Python24\lib\site-packages\web.py", line 2054, in
> > run_wsgi_app
> > result = self.se
In <[EMAIL PROTECTED]>, a wrote:
> Traceback (most recent call last):
> File "C:\Python24\lib\site-packages\web.py", line 2054, in
> run_wsgi_app
> result = self.server.app(env, self.wsgi_start_response)
> File "C:\Python24\lib\site-packages\web.py", line 1894, in wsgifunc
> result = f
please tell me how to do it if i should not make it global
like you guys worry i m not comfortable making it global and mutating
it in every subblock
thanks for reading and helping out
--
http://mail.python.org/mailman/listinfo/python-list
hi bruno georg and erik
you are right i m a newbie,
i just want to do some stuff read out some stuff from a feed and
display it in a page, so my py code, builds this list
and when it goes to cheetah it gives me an error and hence i posted
global has fixed the error but
i keep getting this again and
Georg Brandl wrote:
> No need for "global" here.
Yes, that's true. I was just following the original poster's lead, but
I tend to use a `global` statement whenever I'm mutating a global in a
local block. That works as self-documentation and means you don't have
to be concerned about the prec
Bruno Desthuilliers wrote:
> Georg Brandl wrote:
>> Bruno Desthuilliers wrote:
>>
>>>a wrote:
>>>
def fn():
for i in range(l)
>>>
>>>l is not defined - you should have an error here.
>>>
>>>
global count
count[i]=
how do i declare count to b
Georg Brandl wrote:
> Bruno Desthuilliers wrote:
>
>>a wrote:
>>
>>>def fn():
>>> for i in range(l)
>>
>>l is not defined - you should have an error here.
>>
>>
>>> global count
>>> count[i]=
>>>
>>>how do i declare count to be global if it is an array
>>
>>Just like i
Bruno Desthuilliers wrote:
> a wrote:
>> def fn():
>> for i in range(l)
>
> l is not defined - you should have an error here.
>
>>global count
>>count[i]=
>>
>> how do i declare count to be global if it is an array
>
> Just like it was an integer
No. If he's on
Erik Max Francis wrote:
> a wrote:
>
>> def fn():
>> for i in range(l)
>>global count
>>count[i]=
>>
>> how do i declare count to be global if it is an array
>
> count = [...]
>
> def fn():
> global count
> for i in range(l):
>
a wrote:
> def fn():
> for i in range(l)
l is not defined - you should have an error here.
>global count
>count[i]=
>
> how do i declare count to be global if it is an array
Just like it was an integer
> subsequently i should access or define count as an array
a wrote:
> def fn():
> for i in range(l)
>global count
>count[i]=
>
> how do i declare count to be global if it is an array
count = [...]
def fn():
global count
for i in range(l):
count[i] = ...
--
Erik
12 matches
Mail list logo