mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merged revisions 77161 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77161 | benjamin.peterson | 2009-12-30 13:44:54 -0600 (Wed, 30 Dec 2009) | 12 lines Merged revisions 77157 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77157 | benjamin.peterson | 2009-12-30 13:34:10 -0600 (Wed, 30 Dec 2009) | 5 lines check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604) Also, add a note to the docs about the better behavior of T_OBJECT_EX as compared to T_OBJECT. ........ ................
This commit is contained in:
parent
078d2c9c5f
commit
533849a27a
4 changed files with 27 additions and 6 deletions
|
@ -1044,6 +1044,11 @@ order (MRO) for bases """
|
|||
del h
|
||||
self.assertEqual(s.getvalue(), '')
|
||||
|
||||
class X(object):
|
||||
__slots__ = "a"
|
||||
with self.assertRaises(AttributeError):
|
||||
del X().a
|
||||
|
||||
def test_slots_special(self):
|
||||
# Testing __dict__ and __weakref__ in __slots__...
|
||||
class D(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue