On Thu, 09 Mar 2017 09:43:48 +1100, Chris Angelico wrote:

> On Thu, Mar 9, 2017 at 9:39 AM, Brice PARENT wrote:

>> But a possible workaround, is if we used the first positional
>> argument of dict() as the default value [...]

> ... Granted, there aren't going to be very many objects that are both
> callable and iterable ...

Many stream-like objects are both callable (get the next element of the
stream) and iterable (iterate through the remainder of the stream).  Or
at least that's the way I make mine.  Sometimes.

> Safer to keep this out of the signature of dict itself.

Agreed.

Dan

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to