osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2 Bugs: in Python 3 tutorial, and in bugs.python.org tracker registration system


Hello,

I came to report one bug (in the Python 3 tutorial documentation), and ran
into another (functional in bugs.python.org bug tracker registration
system). I have included details for both bugs below.

Thanks in advance for your assistance, I am loving Python and the
documentation!

Warm regards,
Francis Esmonde-White

###############################

*Bug 1:*
In the Python 3 tutorial section 9.8 for iterators
<https://docs.python.org/3/tutorial/classes.html#iterators>, the example
code for the iterator class Reverse has the iterator self.index defined
only in the __init__. This approach will only allow the iterator to run
once. Would it be better to show an example with the index defined as both
a private field (self._index) and with the index value being populated in
the __index__() function so that the method can be run more than once?

I think that the code example should look like the following:

class Reverse:
    """Iterator for looping over a sequence backwards."""
    def __init__(self, data):
        self.data = data

    def __iter__(self):
        # Define the setup for the iteration here,
        # so that the index is always right when the iteration starts.
        self._index = len(self.data)
        return self

    def __next__(self):
        if self._index == 0:
            raise StopIteration
        self._index = self._index - 1
        return self.data[self._index]


###############################


*Bug 2:*
I received errors when trying to confirm my registration for the bug
tracker at bugs.python.org.

I submitted the registration form, and immediately received the
autogenerated registration confirmation email with the following title:
Complete your registration to Python tracker -- key
6w7gUOVw7AR13ZivbxaDIWedYuNlsiwc
- send a reply to report at bugs.python.org and maintain the subject line as
is (the
reply's additional "Re:" is ok),

- or visit the following URL:

https://bugs.python.org/?@action=confrego&otk=6w7gUOVw7AR13ZivbxaDIWedYuNlsiwc

When I visit the URL, I get an error message:
Invalid URL scheme in homepage URL

[image: image.png]


When I try reply-emailing to the reply-email address, I get an immediate
error response:
Failed issue tracker submission

[image: image.png]

The message header is as follows:

An unexpected error occurred during the processing
of your message. The tracker administrator is being
notified.
Return-Path: <francis at esmonde-white.com>
X-Original-To: report at bugs.python.org
Delivered-To: roundup+tracker at psf.upfronthosting.co.za
Received: from mail-io1-f41.google.com (mail-io1-f41.google.com
[209.85.166.41])
        by psf.upfronthosting.co.za (Postfix) with ESMTPS id 20182575F8
        for <report at bugs.python.org>; Fri, 21 Sep 2018 20:14:55 +0200 (CEST)
Received: by mail-io1-f41.google.com with SMTP id q5-v6so13115080iop.3
        for <report at bugs.python.org>; Fri, 21 Sep 2018 11:14:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=esmonde-white.com; s=google;

h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
        bh=j+2C/XsoJvmbt6nnvO0Fa4MikEbIW3k/zd/YnMGZvuA=;
        b=mZnvJcVfxgR8U2qwjRQ6tQ44enty8yowgK6MU7wvzbNpMQHP7yinlzLAfIwpK1AMzj

 G0dn+xISNwbsXjXG5ECxs+hCVwZ1NNTtDJ9z8lZ6mLuNt56NC9ZdXHV4zuMb+CUjAqQn
         P/G9Ml9JfRumX5RPu38WChj5isbzRPZBKg37E=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to;
        bh=j+2C/XsoJvmbt6nnvO0Fa4MikEbIW3k/zd/YnMGZvuA=;
        b=mwJ5HUkpeSaaL1hMQVJcHEx49qxtoncoexsN9kiHHfFS0wLXp4YHQUrQjPj+7TL30f

 HiqcMzApIkK28s3xaY7K4nHMgxVBXYSvGH9IuITyipIMZRXutaLDLVFnmTuGojRhE098

 4zxzYhg7wdb4RzN6ErdBWOIp/lLQpzQVEPjq1ttS8+1G5axx3Hc0IIPSOCm5JhSokMxJ

 7XcOuxEc9dAw3JG35kKqSZL12+Wy4rawCbr4NA3EzMtliNfr6eTrTYaAGQXVvIhDQw21

 AziPw3nk4b4jJTfHUfR//fFevS5Lee6RbEoZkR6WJiEfc0Cf3T7vAmmbUzIyKoq6oukL
         Xcag==
X-Gm-Message-State: APzg51BW8XYEje6RQgooxkKeoCrzW+raQNVcOCW2YGGWJTf85Gpt1AU9
        ZIh4KDClWBI0FbsJic0pBPs3W94iWGAacb03RAaCDrngLgI=
X-Google-Smtp-Source:
ANB0VdZolOd9qeDV+t3/g0FwyhoMl60y57O9uRsfrCdXb+okMXSiUD2SmmQjBol22Lm5Y3pRiKyoRuJGODwAQFgjZr0=
X-Received: by 2002:a6b:90d4:: with SMTP id
s203-v6mr37864717iod.249.1537553692241;
 Fri, 21 Sep 2018 11:14:52 -0700 (PDT)
MIME-Version: 1.0
References: <20180921181200.0F02E578D9 at psf.upfronthosting.co.za>
In-Reply-To: <20180921181200.0F02E578D9 at psf.upfronthosting.co.za>
From: Francis Esmonde-White <francis at esmonde-white.com>
Date: Fri, 21 Sep 2018 14:14:14 -0400
Message-ID: <CANr6M_B0V-C4d2rQ=
UE0VfP8bU9dFxew2tyrs4DvEvRVYyZDyA at mail.gmail.com>
Subject: Re: Complete your registration to Python tracker -- key
Zgn4fuEPaJDpJ9ZV00ClUdj92h7nEkRp
To: report at bugs.python.org
Content-Type: multipart/alternative;
boundary="000000000000a649eb0576659d88"