Aug-24-2020, 10:35 PM
My general inception If the scripts containing user-defined functions and user-defined classes. And the Python shell is closed. These functions and classes are no longer available to be called or to have their methods or attributes accessed anymore.
My queries are the following:
1) Where are these user-defined classes and functions saved when running a script? for example if I run a script containing the function
I get the following:
<function hello at 0x0000015ED9263CA0>
In other words, what is this location 0x0000015ED9263CA0? And where can I find it? And if I run the script containing the function again, I get a different location at 0x00000119A5DE3CA0. What is exactly happening?
2) How can these user-defined classes and functions be saved permanently- to be called or accessed even if a shell is restarted?
3) When is the Python session data and interpreted script become unavailable anymore?
My queries are the following:
1) Where are these user-defined classes and functions saved when running a script? for example if I run a script containing the function
def hello(): print("Hello, World!")and then I type in hello
I get the following:
<function hello at 0x0000015ED9263CA0>
In other words, what is this location 0x0000015ED9263CA0? And where can I find it? And if I run the script containing the function again, I get a different location at 0x00000119A5DE3CA0. What is exactly happening?
2) How can these user-defined classes and functions be saved permanently- to be called or accessed even if a shell is restarted?
3) When is the Python session data and interpreted script become unavailable anymore?