Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   super not working in __del__ ? (http://www.velocityreviews.com/forums/t341658-super-not-working-in-__del__.html)

Christopher J. Bottaro 02-15-2005 11:34 PM

super not working in __del__ ?
 
I get this exception when I run the following code:

Exception exceptions.TypeError: 'super() argument 1 must be type, not None'
in <bound method Txrposdn.__del__ of <__main__.Txrposdn object at
0xf6f7118c>> ignored

Here is the code:

class Txrposdn(PRI.BasicBatch):

def __init__(self, *argv):
super(Txrposdn, self).__init__(*argv)

def __del__(self):
super(Txrposdn, self).__del__()

if __name__ == "__main__":
prog = Txrposdn(args)
prog.go()


The weird thing is that if move that last code segment into its own
function, the exception doesn't happen:

def main():
prog = Txrposdn(args)
prog.go()

if __name == "__main__":
main()

What is going on? Thanks for the help.



All times are GMT. The time now is 10:36 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.