You should not ever use mutable default args. The documentation benefit is drastically outweighed by the potential for nasty bugs.
http://pythonconquerstheuniverse.wordpress.com/2012/02/15/mu...
In case you're using Python 3, why not write ssl_args: dict, ssl: bool=False?
Well, that's throwing people implementing subclasses under the bus, IMO.
Why not just add @param annotations in your docstrings instead?
> Well, that's throwing people implementing subclasses under the bus, IMO.
If they need to touch this argument in an overridden method and they don't know what they are doing, then yes.
> Why not just add @param annotations in your docstrings instead?
I'm using Sphinx and it renders them separately. I want the empty dict to show up in the function signature.
A single cryptic bug due to this practice will more than negate the minor doc readability benefits you get from that. And there will likely be many more than one cryptic bug.
There are other ways to emphasize it ought to be a dict/mappable. Change its name to be suffixed as "_dict", for example?
For example, this is a real method in one of my projects:
I like the way this turns up in the docs because it's immediately clear that ssl_args needs to be a dict. Otherwise I have to describe it in words.