What is the Variables Loading Policy in Pycharm Python Console AND WHY would I want to use it?
I’ve looked up the doc’n here: Pycharm Variable Loading Policy
and I’m still just as confused as ever.
What is the context that “Variable Loading Policy” is in?
Policy for what? Which variables??
It’s not clear what it means to “load a variable”. Yes, I know the diff b/tw synch/asynch. But variables in the script that the console runs get “loaded” regardless of “policy”. Why do I care how they get loaded?
Console has a variable view where variable/value pairs are displayed. Imagine a class implementing
__str__ and the method either takes quite a lot of time or even trigger an exception. If PyCharm tries to load the instance string representation in this case you will either got stuck while it is calculated or will receive an error. That’s why this option was introduced.
E.g. switching to “On demand” variable loading policy with prevent PyCharm to auto-load variable values