Message276270
Good work! This example is a bit easier to understand:
class Cls:
pass
a = Cls()
a.x = 1
a.y = 2
b = Cls()
b.x = 1
print(hasattr(b, 'y'))
print(b.__dict__.pop('y', None))
$ ./python d.py
False
python: Objects/dictobject.c:1743: _PyDict_Pop: Assertion `ix >= 0' failed.
Aborted (core dumped) |
|
Date |
User |
Action |
Args |
2016-09-13 13:44:21 | christian.heimes | set | recipients:
+ christian.heimes, vstinner, methane, skrah, xiang.zhang |
2016-09-13 13:44:21 | christian.heimes | set | messageid: <1473774261.86.0.260884808309.issue28120@psf.upfronthosting.co.za> |
2016-09-13 13:44:21 | christian.heimes | link | issue28120 messages |
2016-09-13 13:44:21 | christian.heimes | create | |
|