The only Thanks to all of you! Everything's clear now! It does. What you have to understand here is that in your script, B being in the global read : module scope, it doesnt goes out of scope before the script's execution's done. Absolutely not. The only times I use del is when I want to cleanup a namespace from temp vars no longer used usually a module's namespace with some hairy tricks at load time. This discussion thread is closed Start new discussion.
Similar topics Python. Fletcher last post: by. Data Scientist vs Software Engineer. The research path of clustering. How to reverse string using loop. A tool to try open-source projects quickly. Career Advice. Software Engineering Bootcamps worth consider? Python OOP. Exception Handling. File handling. Python Regex. Python Collections.
Python Advance. Python NumPy. Python Pandas. Python Django. Python JSON. Python CSV. Python MySQL. Python MongoDB. Python OpenCV. Python Selenium. So in other words, the method is useless! Isn't it? What's the point? It is not a destructor. Finalizers and destructors are entirely different animals.
Python's context managers the with statement can achieve similar effects in certain circumstances. Instead of del , you can use the with operator. Tags: Python Del. Related Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu
0コメント