Opened 7 years ago

Closed 7 years ago

#14952 closed task (fixed)

non-pythonic if and while expressions in logic module

Reported by: pmscurek Owned by: Paul Scurek
Priority: minor Milestone: sage-5.12
Component: misc Keywords: syntax, logic
Cc: Merged in: sage-5.12.beta3
Authors: Paul Scurek Reviewers: William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14951 Stopgaps:

Description

The syntax for the if and while expressions in the logic module is inconsistant. Most of the time, python conventions are not followed. Here is what most of the expressions look like:

if(<expression>):
    <stuff>

while(<expression>):
    <stuff>

Conventionally, if and while expressions are not in parentheses. The task is to change all if and while expressions to the following:

if <expression>:
    <stuff>

while <expression>:
    <stuff>

Attachments (1)

trac_14952_logic_if_while_syntax.patch (25.6 KB) - added by pmscurek 7 years ago.
fixes syntax issues with this ticket, apply attachment "trac_14951_tokenize_tree_fix.patch" from #14951 first

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by was

  • Reviewers set to William Stein
  • Status changed from new to needs_review

Looks good to me. This is purely a formal notational changes. (Don't look at any code around it, or it will make you nervous -- that's for future work.)

comment:2 Changed 7 years ago by was

  • Status changed from needs_review to positive_review

comment:3 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-pending

Changed 7 years ago by pmscurek

fixes syntax issues with this ticket, apply attachment "trac_14951_tokenize_tree_fix.patch" from #14951 first

comment:4 Changed 7 years ago by was

Still LGTM.

comment:5 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-pending to sage-5.12

comment:6 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.12.beta3
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.