Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
Class destructor
 

Index | Next | Previous | View Flat


nmm1 at cus

Feb 28, 2007, 1:00 AM


Views: 477
Permalink
Class destructor

I am gradually making progress with my binary floating-point software,
but have had to rewrite several times as I have forgotten most of the
details of how to do it! After 30 years, I can't say I am surprised.

But I need to clean up workspace when a class (not object) is
deallocated. I can't easily use attributes, as people suggested,
because there is no anonymous storage built-in type. I could subvert
one of the existing storage types (buffer, string etc.), but that is
unclean. And I could write one, but that is excessive.

So far, I have been unable to track down how to get something called
when a class is destroyed. The obvious attempts all didn't work, in
a variety of ways. Surely there must be a method? This could be in
either Python or C.

Thanks.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1[at]cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
_______________________________________________
Python-Dev mailing list
Python-Dev[at]python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Subject User Time
Class destructor nmm1 at cus Feb 28, 2007, 1:00 AM
    Re: Class destructor pje at telecommunity Feb 28, 2007, 8:40 AM
    Re: Class destructor nmm1 at cus Feb 28, 2007, 9:24 AM
        Re: Class destructor pje at telecommunity Feb 28, 2007, 9:51 AM
    Re: Class destructor nmm1 at cus Feb 28, 2007, 10:00 AM
    Re: Class destructor guido at python Mar 1, 2007, 5:16 PM
    Re: Class destructor nmm1 at cus Mar 2, 2007, 1:23 AM
    Re: Class destructor nmm1 at cus Mar 2, 2007, 1:53 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.