Skip to content

Instantly share code, notes, and snippets.

@ironpythonbot
Created September 28, 2013 06:59
Show Gist options
  • Save ironpythonbot/6739331 to your computer and use it in GitHub Desktop.
Save ironpythonbot/6739331 to your computer and use it in GitHub Desktop.
CodePlex Issue #33185 Plain Text Attachments
class OldStyle:
def __init__(self, arg):
print "OldStyle"
class NewStyleWithInit1(OldStyle,object):
def __init__(self,arg):
print "NewStyleWithInit1"
class NewStyleWithInit2(object,OldStyle):
def __init__(self,arg):
print "NewStyleWithInit2"
class NewStyleNoInit1(OldStyle,object):
pass
class NewStyleNoInit2(object,OldStyle):
pass
print "---------"
foo=NewStyleWithInit1(0)
print "---------"
foo=NewStyleWithInit2(0)
print "---------"
try:
foo=NewStyleNoInit1(0)
except Exception as e:
print "***** Failed *****"
print e
print "---------"
try:
foo=NewStyleNoInit2(0)
print "***** Failed *****"
except Exception as e:
print e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment