mikedewar / d3py

a plottling library for python, based on D3
1.42k stars 202 forks source link

_clanup() - what is it purpose? #62

Open kern3020 opened 11 years ago

kern3020 commented 11 years ago

Hello,

There is a method stub called _clanup() in the Figure class which simply raises NotImplementedError. What is the purpose of it?

-jk

mynameisfiber commented 11 years ago

Cleanup is a function that is called on __exit__ or __del__ for any cleanup necessary. This could be to delete files if we are using the local FS for temporary storage, to clean up any threads we had going or anything else you could want. For example, in the default figure it shuts down the HTTP server and cleans up the threads so that the port is no longer in use: https://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L259

kern3020 commented 11 years ago

Hello Micha,

Yes, I see how exit and del call _cleanup but notice it isn't a typo in the title of this bug report. Consider the _clanup() method on line 85 ttps://github.com/mikedewar/d3py/blob/master/d3py/figure.py#L85 I do not believe it is called. Did I miss something?

-jk

kern3020 commented 11 years ago

Took the liberty of removing this method in my next pull request.