[issue30590] str.format no longer accepts unpacked defaultdict for default values

2017-06-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There was a bug (see issue18531). It was fixed in 3.6. Use str.format_map() for formatting with arbitrary mapping. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed

[issue30590] str.format no longer accepts unpacked defaultdict for default values

2017-06-07 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue30590] str.format no longer accepts unpacked defaultdict for default values

2017-06-07 Thread Carmen Bianca Bakker
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