You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is annoying that the output in sagemath CLIs/cells is different from the sagemath generated output.
As far as I understand, eval and preparse are called to generate the output. The output is written to result. Then only result is represented, not what was written to stdout.
With python3, print became a function and thus the problem occurs with one of the most fundamental primitives. Thus, it is IMHO particularly annoying.
This is an interesting and potentially good idea (certainly the point about
`print` is well-noted!). The main thing is to ensure that there is no
subtle change in what people "usually" use SageTeX for. Are there any
places where `result` is actually what is desired, not `stdout`, since this
is intended for pdf/print and not interactive use? Or any concern that
this might significantly increase processing time for a large project?
I cannot speak for the entire community, but my personal take is …
The output will change. Since there is no mechanism to communicate output changes across versions on CTAN, one might soften the blow with an optional flag. Per default, you get the previous behavior. Enabling the option, the output is caught as I described initally. If the community prefers it in general, the behavior will become default some years later and an option allows to get the old behavior.
I submitted this bug report, because a user in a talk described how much annoyance this created for her. As someone with limited technical knowledge, she did not know what is going on. I looked into the technical details. So this comes from the community itself.
I cannot see a problem with processing time. But the memory usage increases. This is an argument in favor of an optional flag instead of non-optional future behavior.
I learned that the request might be a direct result of Cryptool, a software and its German book about cryptography which uses sagetex for generating its content.
Expected output
Actual output
Proposed solution
It is annoying that the output in sagemath CLIs/cells is different from the sagemath generated output.
result
. Then onlyresult
is represented, not what was written to stdout.print
became a function and thus the problem occurs with one of the most fundamental primitives. Thus, it is IMHO particularly annoying.sys.stdout
during execution, represent the caught lines and skip representation of the result if it isNone
The text was updated successfully, but these errors were encountered: