This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author carmenbianca
Recipients carmenbianca
Date 2017-06-07.16:39:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496853548.43.0.683840894266.issue30590@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-06-07 16:39:08carmenbiancasetrecipients: + carmenbianca
2017-06-07 16:39:08carmenbiancasetmessageid: <1496853548.43.0.683840894266.issue30590@psf.upfronthosting.co.za>
2017-06-07 16:39:08carmenbiancalinkissue30590 messages
2017-06-07 16:39:08carmenbiancacreate