A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-July/016376.html below:

[Python-Dev] Iterator addition?

[Python-Dev] Iterator addition? [Python-Dev] Iterator addition?Sami Hangaslammi shang@cc.jyu.fi
Mon, 30 Jul 2001 09:56:09 +0300 (EET DST)
Since iterator objects work like sequences in several contexts, maybe they
could support sequence-like operations such as addition. This would let
you write

  for x in iter1 + iter2:
      do_something(x)

instead of

  for x in iter1:
      do_something(x)

  for x in iter2:
      do_something(x)

or the slightly better

  for i in iter1,iter2:
      for x in i:
          do_something(x)


-- Sami Hangaslammi --




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