~pythonregexp2.7/python/issue2636-11

« back to all changes in this revision

Viewing changes to Lib/test/crashers/loosing_mro_ref.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-21 17:53:26 UTC
  • mfrom: (39025.1.14 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080921175326-92vaej2hc3yuecxb
Merged in changes from the core Regexp branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
class Base2(object):
28
28
    mykey = 'from Base2'
29
29
 
30
 
class X(Base):
31
 
    # you can't add a non-string key to X.__dict__, but it can be
32
 
    # there from the beginning :-)
33
 
    locals()[MyKey()] = 5
 
30
# you can't add a non-string key to X.__dict__, but it can be
 
31
# there from the beginning :-)
 
32
X = type('X', (Base,), {MyKey(): 5})
34
33
 
35
34
print X.mykey
36
35
# I get a segfault, or a slightly wrong assertion error in a debug build.