gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.8k stars 262 forks source link

Extra line in the outputs #217

Closed hasanAjsf closed 3 years ago

hasanAjsf commented 3 years ago

In all my outputs I get extra line showing output length and , which looks for me as (string, error) , as underlined below is my understandin correct, and is this an optional output?

image

cosmos72 commented 3 years ago

Hi @hajsf, this is intentional. The Out[n] lines you are seeing list the return values of the expression being evaluated.

It can be confusing when the expression both writes to standard output / standard error and return some values - that's exactly what fmt.Printf does: it also returns the number of bytes written and any error. That's what you are seeing.

It should be clearer from the example below, which do not have side effects image