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/2006-November/069979.html below:

[Python-Dev] Passing actual read size to urllib reporthook

[Python-Dev] Passing actual read size to urllib reporthook [Python-Dev] Passing actual read size to urllib reporthookFredrik Lundh fredrik at pythonware.com
Mon Nov 20 13:20:01 CET 2006
Martin v. Löwis wrote:

> While this is a behavior change (and even for
> explicitly-documented behavior), I still propose
> to apply the change:
> - in many cases, the number of bytes read will
>  equal to the block size, so no change should
>  occur
> - the signature (number of parameters) does not
>  change, so applications shouldn't crash because
>  of that change
> - applications that do use the parameter to
>  estimate total download time now get a better
>  chance to estimate since they learn about
>  short reads.

haven't used the reporthook, but my reading of the documentation would have led me
to believe that I should do count*blocksize to determine how much data I've gotten this
far.  changing the blocksize without setting the count to zero would break such code.

</F> 



More information about the Python-Dev mailing list

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