5 ms·
Well, that's throwing people implementing subclasses under the bus, IMO. Why not just add @param annotations in your docstrings instead?
by tribaal 12y ago
Well, that's throwing people implementing subclasses under the bus, IMO.
Why not just add @param annotations in your docstrings instead?
- geertj 12y ago> 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.
- Peaker 12y agoA 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?