[Patches] [ python-Patches-788509 ] Glossary

SourceForge.net noreply at sourceforge.net
Thu Aug 14 07:29:13 EDT 2003


Patches item #788509, was opened at 2003-08-13 23:04
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=788509&group_id=5470

Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: Glossary

Initial Comment:
The topic of iterables came up on c.l.py recently.  One 
of the participants mentioned that "iterable" isn't listed
in the index of either the language or library reference
manuals.  A quick search didn't yield any obvious 
definition of what an iterable is.  (There may be something
I missed.  I wasn't terribly thorough in my search.)

The attached patch attempts to fix that omission by adding
a glossary to the language reference manual.  Maybe it 
should be a separate manual.  It doesn't seem like it
belongs in the tutorial, and the library reference manual
doesn't cover the language itself.

Keep, toss, throw darts at, or pass back for action.

S


----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2003-08-14 08:29

Message:
Logged In: YES 
user_id=44345

Agreed.  Any glossary with only one entry would be a bit thin.
Thanks for the new entry. :-)


----------------------------------------------------------------------

Comment By: Duncan Booth (duncanb)
Date: 2003-08-14 03:33

Message:
Logged In: YES 
user_id=74031

Sorry, but I'm going to throw darts at this. You need to have 
glossary entries for both 'iterable' and 'iterator', and you're 
current definition of 'iterable' is actually the definition 
of 'iterator' not of 'iterable'.

Try something like this:

\index{iterable{
\item[iterable] Any object which supports enumeration of a 
set of values by calling its \method{__iter__} which returns 
an iterator over those values. Examples include \class{file},
\class{list} and \class{dict} objects.  In the case of \class
{dict} objects, iteration is over the keys in the object.

\index{iterator}
\item[iterator] An object which supports enumeration of a
set of values by calling its \method{next} method and which
contains an \method{__iter__} method which returns the
object itself.  Examples: \class{file} is a iterable which is its 
own iterator. \class{list} and \class{dict} are iterables which 
create iterators of types which are not otherwise visible.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=788509&group_id=5470



More information about the Patches mailing list