Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
python
/
cpython3
/
2f40ed4b94ad48cca01a96620da8c3eb15493539
/
.
/
Lib
/
test
/
crashers
/
underlying_dict.py
blob: a4b799374381d51e7638f2cb4676b842e7c5d19f [
file
] [
log
] [
blame
]
import
gc
thingy
=
object
()
class
A
(
object
):
def
f
(
self
):
return
1
x
=
thingy
r
=
gc
.
get_referrers
(
thingy
)
if
"__module__"
in
r
[
0
]:
dct
=
r
[
0
]
else
:
dct
=
r
[
1
]
a
=
A
()
for
i
in
range
(
10
):
a
.
f
()
dct
[
"f"
]
=
lambda
self
:
2
print
(
a
.
f
())
# should print 1