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/2001-February/012707.html below:

for in dict (user expectation poll)

[Python-Dev] re: for in dict (user expectation poll) [Python-Dev] re: for in dict (user expectation poll)Thomas Wouters thomas@xs4all.net
Tue, 6 Feb 2001 20:52:53 +0100
On Tue, Feb 06, 2001 at 08:59:04AM -0800, Ka-Ping Yee wrote:

> What would make for-loops easier to present, given this experience?

A simpler version of

  for x in range(len(sequence)):

obviously :) (a.k.a. 'indexing for') One that gets taught *before* 'if x in
sequence', preferably. Syntax that stands out against 'x in sequence', but
makes 'x in sequence' seem very logical if encountered after the first
syntax. Something like

  for x over sequence:

or

  for x in 0 .. sequence:
 (as in)
  for x in 1 .. 10:

or

  for each number x in sequence:

or something or other. My gut feeling says there is a sensible and clear
syntax out there, but I haven't figured it out yet :)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



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