id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
12927,Logging synchronises input and output wrongly.,itaibn,jason,"In `sage/misc/log.py`, the following is in the documentation:
{{{
""""""
There is an off-by-one issue with IPython's input and output
history; ``__IPYTHON__.input_hist_raw`` is a *list* containing
the un-preparsed Sage commands. However,
``__IPYTHON__.output_hist`` is a dictionary whose keys are
integers and whose values are outputs. This is good because
not every input has an output.
**BUT**, the output from::
__IPYTHON__.input_hist_raw[n]
is stored in::
__IPYTHON__.output_hist[n+1] !
This is annoying and it may be a bug. Right now the loggers
correct for this, but if modifying or extending this code,
consider yourself warned.
""""""
}}}
This is incorrect. In fact, the compensation for this inside the code makes the input and output out of synchronisation. This can be seen in the following log:
{{{
Sage Log 2012-05-08-190000
1 sage: sage.misc.preparser.load(sage.misc.preparser.base64.b64decode(""L2hvbWUvaXRhaWJuLy5zYWdlLy9pbml0LnNhZ2U=""),globals(),False)
2
2 sage: 1+1
3 sage: log_text()
}}}",defect,needs_work,major,sage-6.4,misc,,log logging,,,,,N/A,,,,,