You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
urllib -- add_handler method refactoring for clarity #61924
Response handlers are registered with the OpenerDirector class in the urllib.request module using the add_handler method--it's a convoluted method that I refactored for legibility's sake.
I presume you closed this bug yourself because you decided it probably wasn't worth applying it? I'm inclined to agree. Cleaning up the code would be nice, but since the existing code works fine, changing it *just* to clean it up probably isn't worth the code churn or the chance of introducing an unexpected new bug.
If we were also fixing a bug while doing the rewrite, it would be a different story. So I'll try to keep this patch in mind if we have occasion to fix anything in that code.
Activity
MaxMautner commentedon Apr 13, 2013
Response handlers are registered with the OpenerDirector class in the urllib.request module using the add_handler method--it's a convoluted method that I refactored for legibility's sake.
bitdancer commentedon Apr 28, 2013
I presume you closed this bug yourself because you decided it probably wasn't worth applying it? I'm inclined to agree. Cleaning up the code would be nice, but since the existing code works fine, changing it *just* to clean it up probably isn't worth the code churn or the chance of introducing an unexpected new bug.
If we were also fixing a bug while doing the rewrite, it would be a different story. So I'll try to keep this patch in mind if we have occasion to fix anything in that code.