Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

I agree with Serhiy that using mutable defaults is not automatically a bad 
idea. This is unnecessary code churn that fixes no bugs and adds no new 
functionality and doesn't make the code "better".

The PR removes one harmless use of a mutable default but adds the "code smell" 
that assumes that None is the only possible falsey value. This means that the 
``__init__`` method will accept any falsey value without complaint:

    Request(url, headers=0.0)

which is worse than the current code.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38654>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to