siuba
siuba copied to clipboard
placeholder variable retaining state in MS VSCode
siuba
does not work in Microsoft Visual Studio Code interactive window: for some reason the placeholder variable retains its state (i.e., the outcome of the previous calculation) which of course prevents using it further (without reimporting).
I have version 1.1.3 of pandas
and version 0.0.24 of siuba
.
From VScode side, I'm using 1.51.1 with v2020.11.0 of MS Python extension and v1.1.85 of Pyright extension installed.
Not sure whether there's anything you can do on the siuba
side but wanted to let you know.
This is a fantastic initiative, thank you for this!
Ah, thanks for the heads up! I haven't used VS Code in a while, but am downloading now to check it out :o.
hmm.. I wasn't able to replicate, but am not too familiar with vs code. Are you using a specific extension to run code interactively in IPython?
Here's what I tried (but note that the interactive mode is using plain python, so I may be missing a critical piece..):
Yes, it happens when run in Python Interactive window (the feature is part of Microsoft Python extension). Running in terminal works fine for me as well.
Ah, okay--thanks for the help. I tried running in a python interactive window, and it seems to work okay:
Any idea what I might be missing? If possible, would you mind sending a screencast (or screenshots) of the issue?
Hmm, no idea. The Pylance extension, perhaps?
The underscore access to the last values is a feature of the IPython shell: https://ipython.org/ipython-doc/3/interactive/reference.html#output-caching-system
You could try setting InteractiveShell.cache_size = 0
in your IPython config file.