The Artima Developer Community
Sponsored Link

Python Buzz Forum
Python iterators and sentinel values

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bob Ippolito

Posts: 255
Nickname: etrepum
Registered: Nov, 2003

Bob Ippolito uses MacPython too much
Python iterators and sentinel values Posted: Jun 14, 2005 3:34 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Bob Ippolito.
Original Post: Python iterators and sentinel values
Feed Title: Bob's Rants
Feed URL: http://www.pycs.net/bob/weblog/rss.xml
Feed Description: from __future__ import *
Latest Python Buzz Posts
Latest Python Buzz Posts by Bob Ippolito
Latest Posts From Bob's Rants

Advertisement
.. -*- mode: rst -*- A little known feature of `PEP 234: Iterators`_ (implemented in Python 2.1 and later) is the alternate form: .. pycode:: iter(callable, sentinel) This form creates an iterator out of any callable, and will stop when an exception is raised or the sentinel value is returned ...

Read: Python iterators and sentinel values

Topic: Easy as Py Previous Topic   Next Topic Topic: The great will always soar above the mediocre...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use