[Python-checkins] [python/cpython] 712114: [3.6] bpo-30197: Enhance functions swap_attr() and...

GitHub noreply at github.com
Fri Apr 28 13:05:07 EDT 2017


  Branch: refs/heads/3.6
  Home:   https://github.com/python/cpython
  Commit: 712114b3f9f5f98f03c66a80607b6f7101c5cc90
      https://github.com/python/cpython/commit/712114b3f9f5f98f03c66a80607b6f7101c5cc90
  Author: Serhiy Storchaka <storchaka at gmail.com>
  Date:   2017-04-28 (Fri, 28 Apr 2017)

  Changed paths:
    M Lib/test/support/__init__.py
    M Lib/test/test_support.py
    M Lib/test/test_tempfile.py
    M Misc/NEWS

  Log Message:
  -----------
  [3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in test.support. (GH-1341) (#1345)

They now work when delete replaced attribute or item inside the with
statement.  The old value of the attribute or item (or None if it doesn't
exist) now will be assigned to the target of the "as" clause, if there is
one.

(cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)




More information about the Python-checkins mailing list