Message301127
> Finally, urllib/robotparser.py appears to contain a bug in the
> following:
>
> req_rate = collections.namedtuple('req_rate',
> 'requests seconds')
> entry.req_rate = req_rate
> entry.req_rate.requests = int(numbers[0])
> entry.req_rate.seconds = int(numbers[1])
>
> As I read it, this should fail as the req_rate is immutable.
Ref: https://news.ycombinator.com/item?id=15136961
They are mistaken in the nature of the bug, which is that req_rate is
a namedtuple type, rather than an instance. As such, it is actually
mutable, causing the assignments to not fail. Every entry creates a
separate req_rate type, so it all works, but not in the way it should. |
|
Date |
User |
Action |
Args |
2017-09-01 15:15:22 | gvx | set | recipients:
+ gvx |
2017-09-01 15:15:22 | gvx | set | messageid: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> |
2017-09-01 15:15:22 | gvx | link | issue31325 messages |
2017-09-01 15:15:22 | gvx | create | |
|