Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

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.

…ort.

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.
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @brettcannon, @benjaminp and @ncoghlan to be potential reviewers.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM appart the docstring.

block.
"""
if hasattr(obj, attr):
real_val = getattr(obj, attr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should update the docstring.

@vstinner vstinner merged commit d1a1def into python:master Apr 28, 2017
@serhiy-storchaka serhiy-storchaka deleted the test-support-swap-attr-item branch April 28, 2017 16:25
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
…t.support. (python#1341)

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 d1a1def)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
…t.support. (pythonGH-1341)

* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.

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.

* Update docstrings..
(cherry picked from commit d1a1def)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
…t.support. (python#1341)

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 d1a1def)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
…t.support. (pythonGH-1341)

* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.

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.

* Update docstrings..
(cherry picked from commit d1a1def)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 28, 2017
…t.support. (pythonGH-1341)

* bpo-30197: Enhance functions swap_attr() and swap_item() in test.support.

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.

* Update docstrings..
(cherry picked from commit d1a1def)
serhiy-storchaka added a commit that referenced this pull request Apr 28, 2017
…t.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 d1a1def)
serhiy-storchaka added a commit that referenced this pull request Apr 28, 2017
…t.support. (#1341) (#1346)

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 d1a1def)
serhiy-storchaka added a commit that referenced this pull request Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants