It seems long Python objects are not truncated when printed in the terminal in interactive mode, such as lists for example. This is problematic when dealing with large objects, as it takes a long time to print them in the console and might lead the system to crash.
Steps to reproduce:
- Initialize a long Python list
- Print it in the editor
Expected behavior:
- Should truncate the outputs to print to something reasonable.
Acutal behavior:
- Prints the whole object regardless of size.
Example code (e.g. type in VS Code, select all, press Shift + Enter):
import numpy as np
a = np.random.normal(size = 10**7)
a.tolist()
It seems long Python objects are not truncated when printed in the terminal in interactive mode, such as lists for example. This is problematic when dealing with large objects, as it takes a long time to print them in the console and might lead the system to crash.
Steps to reproduce:
Expected behavior:
Acutal behavior:
Example code (e.g. type in VS Code, select all, press Shift + Enter):