[Python-Dev] "Length of str " changes after passed in Python 2.5

Leo.Barendse at nokia.com Leo.Barendse at nokia.com
Fri Apr 24 23:57:36 CEST 2009


-----------------------------------------------------------

I have the following code:

#  len(all_svs) = 10


# the I call a function  with 2 list parameters

def proc_line(line,all_svs) :


# inside the function the length of the list "all_svs" is 1 more -> 11
# I had to workaround it


for i in range(len(all_svs)  - 1 ) :    # some how the length of all_svs  is incremented !!!!!!!!!!!!!!!!!!!!!!!!!!!

--------------------------------------------------------------

Is this a compiler bug ??

Or is it because of my first try of Python

Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090424/173e46da/attachment.htm>


More information about the Python-Dev mailing list