A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-December/070143.html below:

[Python-Dev] a feature i'd like to see in python #1: better iteration control

[Python-Dev] a feature i'd like to see in python #1: better iteration control [Python-Dev] a feature i'd like to see in python #1: better iteration controlAdam Olsen rhamph at gmail.com
Sun Dec 3 16:41:55 CET 2006
On 12/3/06, Ben Wing <ben at 666.com> wrote:
> many times writing somewhat complex loops over lists i've found the need
> to sometimes delete an item from the list.  currently there's no easy
> way to do so; basically, you have to write something like

As I don't believe there's any need for a language extension, I've
posted my approach to this on comp.lang.python:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/724aa6bcf021cfad/c4c629bd1bacc12b#c4c629bd1bacc12b

Note that deleting from the list as you iterate over it tends to have
very poor performance for larger lists.  My post includes some
timings, demonstrating this.

-- 
Adam Olsen, aka Rhamphoryncus
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4