New submission from Carmen Bianca Bakker:

As brief as can be, the following script works in Python 3.4 and Python 3.5:

    from collections import defaultdict

    mydict = defaultdict(lambda: 'default')

    print('{foo}'.format(**mydict))

And prints "default".

In Python 3.6, you get a KeyError for foo.

----------
components: Library (Lib)
messages: 295353
nosy: carmenbianca
priority: normal
severity: normal
status: open
title: str.format no longer accepts unpacked defaultdict for default values
versions: Python 3.6

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

Reply via email to