opticspy / lightpipes

LightPipes for Python, "Pure Python version"
https://opticspy.github.io/lightpipes/
BSD 3-Clause "New" or "Revised" License
228 stars 53 forks source link

Why LightPipes should be put in try finally block? #6

Closed guyskk closed 7 years ago

guyskk commented 7 years ago

I found this in examples:

try:
    LP=LightPipes.Init()
        ...
finally:
    del LightPipes
FredvanGoor commented 7 years ago

It can be removed. I thought it was nice to clean up at the end. But it is done automatically at the end? Then I will remove it

guyskk commented 7 years ago

python has garbage collection which will clean up automatically.

guyskk commented 7 years ago

Also, the try import except can be replaced by single import.