It would be nice if dict.update.__doc__ conveyed some of the subtleties of the update algorithm. See the patch. I changed __doc__ to mention the fast path for dicts, and changed one instance of E: -> E.keys():
I'm not sure that we should mention the fast path for dicts. That is an implementation detail and may not be present in IronPython, PyPy, Jython, etc. The current version includes: D.updated(E, **F) --> None. Updated D for dict/iterable E and F. ISTM that covers the semantics of what it does. Your proposed modification gets into how it does it.
CPython's dict(obj) ignores `keys` and `__iter__` if obj is a subclass of dict. I thought this was an important language detail, not just an implementation quirk. But, I just tested pypy 1.3, and it is calling .keys() on dicts. Oh well. I think the __doc__ can still be slightly improved; ignore my patch and just change the first E: to E.keys(): - that would be more accurate.
> Maybe the fastpath should do a strict check and not > be used for subclasses of dict? This code is ancient and well-established. IMO, nothing good can come from changing it (besides slowing down code that is already deployed and working fine).