blob: 0479952b2ca44dddaf54eafc5dfb5cddb5a2392d [file] [log] [blame]
Armin Rigob4b5a762006-01-14 10:58:30 +00001
2# http://python.org/sf/1174712
3
4import types
5
6class X(types.ModuleType, str):
7 """Such a subclassing is incorrectly allowed --
8 see the SF bug report for explanations"""
9
10if __name__ == '__main__':
11 X('name') # segfault: ModuleType.__init__() reads
12 # the dict at the wrong offset