RE: Py2.3: Feedback on Sets

Discussion in 'Python' started by Delaney, Timothy C (Timothy), Aug 14, 2003.

  1. > From: Gary Feldman [mailto:]
    >
    > Also, I'd like to see "iterable must be <some type spec>",
    > though this is a general flaw in the Python doc and is perhaps
    > biased by my C/C++ background where you'd never dream
    > of doing a reference manual without explicitly indicating the
    > types of every parameter.


    "iterable" *is* <some type spec>. If something is "iterable" it has a well-defined interface - specifically:

    iter(iterable)

    returns an "iterator", which also has a well-defined interface - specifically that it implements:

    next()
    __iter__() returning self

    Tim Delaney
    Delaney, Timothy C (Timothy), Aug 14, 2003
    #1
    1. Advertising

  2. Delaney, Timothy C (Timothy)

    Gary Feldman Guest

    On Thu, 14 Aug 2003 09:35:24 +1000, "Delaney, Timothy C (Timothy)"
    <> wrote:


    >"iterable" *is* <some type spec>. If something is "iterable" it has a well-defined interface - specifically:


    I get what you mean, but let me point out that "iterable" does not appear
    in the index of either the Language Reference or Library Reference, nor do
    I see it in the introduction. Actually, the introduction would really
    benefit from a description of all the conventions used in the manual. As
    it stands, one has to come across this usage several times to realize it's
    a convention (and that's not the way many people use reference manuals).

    What would be really cool, and probably easy, is to just make sure that
    every occurrence of "iterable" is a link to a page that describes that
    well-defined interface.

    This is still beyond the scope of the question about the Set documentation.
    I appreciate the responses, but I'm not sure whether this is the right time
    to continue this sort of discussion.

    Gary
    Gary Feldman, Aug 14, 2003
    #2
    1. Advertising

  3. Gary> I get what you mean, but let me point out that "iterable" does not
    Gary> appear in the index of either the Language Reference or Library
    Gary> Reference, nor do I see it in the introduction.

    That's a documentation bug then. The concrete notion of an "iterable"
    arrived on the Python scene relatively recently, and the docs apparently
    haven't quite caught up in that respect.

    Skip
    Skip Montanaro, Aug 14, 2003
    #3
  4. Delaney, Timothy C (Timothy)

    Gary Feldman Guest

    On Wed, 13 Aug 2003 23:07:18 -0500, Skip Montanaro <> wrote:

    >
    > Skip> That's a documentation bug then.
    >
    >See the patch I just submitted at
    >
    > http://python.org/sf/788509
    >


    I appreciate your doing this, and my next step (while I wait for answers to
    my recently posted question) is to get into the bug system.

    But in thinking about this, I'm still unconvinced about the original
    wording. It says "... elements obtained from iteration." Iteration, in
    this context, is still an abstract concept. It describes the how. But as
    you've already pointed out, the how is implicit in the name of the
    argument. Just from a grammatical/semantic point of view, it ought to
    describe the what, i.e. "... elements obtained from this parameter," though
    "... updates the set by iterating over this parameter" works, too.

    In other words, I find it easier to infer that iteration is being used than
    to infer the source of iteration.

    Many thanks, especially for the patience being shown,

    Gary
    Gary Feldman, Aug 18, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raymond Hettinger

    Py2.3: Feedback on Sets

    Raymond Hettinger, Aug 12, 2003, in forum: Python
    Replies:
    21
    Views:
    701
    Christos TZOTZIOY Georgiou
    Aug 20, 2003
  2. David Mertz

    Re: Py2.3: Feedback on Sets (fwd)

    David Mertz, Aug 16, 2003, in forum: Python
    Replies:
    10
    Views:
    527
    David Mertz
    Aug 18, 2003
  3. Beni Cherniavsky

    Re: Py2.3: Feedback on Sets

    Beni Cherniavsky, Aug 17, 2003, in forum: Python
    Replies:
    10
    Views:
    563
    Seo Sanghyeon
    Aug 28, 2003
  4. Beni Cherniavsky

    Re: Py2.3: Feedback on Sets

    Beni Cherniavsky, Aug 20, 2003, in forum: Python
    Replies:
    1
    Views:
    308
    Christos TZOTZIOY Georgiou
    Aug 22, 2003
  5. Holger Joukl

    py2.1->py2.3.3 __getattr__ confusion

    Holger Joukl, Jul 2, 2004, in forum: Python
    Replies:
    1
    Views:
    308
    Peter Otten
    Jul 2, 2004
Loading...

Share This Page