Skip to content

Instantly share code, notes, and snippets.

@ironpythonbot
Created December 9, 2014 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironpythonbot/11dd4a2da21842932da4 to your computer and use it in GitHub Desktop.
Save ironpythonbot/11dd4a2da21842932da4 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