Created
December 9, 2014 18:04
-
-
Save ironpythonbot/11dd4a2da21842932da4 to your computer and use it in GitHub Desktop.
CodePlex Issue #33185 Plain Text Attachments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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