Velocity Reviews

Velocity Reviews (
-   Python (
-   -   super not working in __del__ ? (

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)

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)

if __name == "__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.