[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The update() method returns None. This is a correct behavior. The rationale is the same as for list.sort(), see https://docs.python.org/3/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list. -- nosy:

[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Eric V. Smith
Eric V. Smith added the comment: dict.update() returns None, so this is expected. Maybe you want: >>> x = {"X":123} >>> x.update({"abc":123}) >>> x {'X': 123, 'abc': 123} >>> -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed

[issue32135] Dict creation with update will result to NoneType

2017-11-25 Thread Martin
New submission from Martin : >>> x = {"x":123}.update({"abc":123}) >>> type(x) -- messages: 306977 nosy: thedemz priority: normal severity: normal status: open title: Dict creation with update will result to NoneType type: behavior versions: Python 3.6