Bug 373150

Summary: Wrong output during "evaluate worksheet"
Product: [Applications] cantor Reporter: Alexander Semke <alexander.semke>
Component: python3-backendAssignee: Filipe Saraiva <filipe>
Status: RESOLVED FIXED    
Severity: normal CC: fernandotalves, filipe, simgunz
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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