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

2009-04-24 Thread leo.baren...@nokia.com

---

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

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2009-04-24 Thread Aahz
On Fri, Apr 24, 2009, leo.baren...@nokia.com wrote:

 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

This sounds like a usage question.  Please use comp.lang.python (or
possibly the tutor mailing list).
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur.  --Red Adair
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com