Bug 373150 - Wrong output during "evaluate worksheet"
Summary: Wrong output during "evaluate worksheet"
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: python3-backend (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Filipe Saraiva
URL:
Keywords:
: 363600 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-01 17:28 UTC by Alexander Semke
Modified: 2017-04-28 19:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Semke 2016-12-01 17:28:17 UTC
Start a new python3 session, add two command entries 
a=1
b=2
and evaluate the worksheet. The output for the second entry is the output of print(globals()) which is wrong.
Comment 1 Filipe Saraiva 2016-12-02 13:07:20 UTC
Do you confirm this problem @Alex Semke? I can not confirm here.
Are you using the master branch version?
Comment 2 Filipe Saraiva 2016-12-02 13:10:10 UTC
Sorry, I can confirm the bug.

The bug happen only if I press the "Evaluate worksheet" button. If I use the shortcut Shift+Enter to evaluate the worksheet, the bug doesn't happen.
Comment 3 Alexander Semke 2016-12-02 20:04:16 UTC
"Shirt+Enter" evaluates the current command entry only. "Evaluate worksheet" evaluates all entries. The error/difference must be somewhere in CommandEntry::evaluate() being called with WorksheetEntry::EvaluateNext in Worksheet::evaluate().
Comment 4 Alexander Semke 2016-12-02 20:06:27 UTC
*** Bug 363600 has been marked as a duplicate of this bug. ***
Comment 5 Filipe Saraiva 2017-04-28 19:06:31 UTC
Looks like Minh Ngo fixed this bug with commit [1]. I am going to close it, if this bug is present yet please reopen it.

[1] https://phabricator.kde.org/R55:1a55790f477f5f2ece5aa901b9a943f4f1d90d0a