Author pablogsal
Recipients aldwinaldwin, miss-islington, ned.deily, nedbat, p-ganssle, pablogsal, scoder, serhiy.storchaka, xtreak
Date 2019-07-05.21:02:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1562360576.34.0.601112273503.issue37500@roundup.psfhosted.org>
In-reply-to
Content
> To add to the confusion, the treatment of "if __debug__:" and "if not __debug__:" is now asymmetric:

After the code in PR 14116 this becomes:

  5           0 LOAD_GLOBAL              0 (print)
              2 LOAD_CONST               1 ('debug')
              4 CALL_FUNCTION            1
              6 POP_TOP
              8 JUMP_ABSOLUTE           30

  7          10 LOAD_GLOBAL              0 (print)
             12 LOAD_CONST               2 ('not debug')
             14 CALL_FUNCTION            1
             16 POP_TOP

  8          18 JUMP_ABSOLUTE           30

  9          20 LOAD_GLOBAL              0 (print)
             22 LOAD_CONST               3 ('NOT DEBUG')
             24 CALL_FUNCTION            1
             26 POP_TOP
             28 JUMP_FORWARD             8 (to 38)

 11     >>   30 LOAD_GLOBAL              0 (print)
             32 LOAD_CONST               4 ('DEBUG')
             34 CALL_FUNCTION            1
             36 POP_TOP
        >>   38 LOAD_CONST               0 (None)
             40 RETURN_VALUE

and

  4           0 JUMP_ABSOLUTE           12

  5           2 LOAD_GLOBAL              0 (print)
              4 LOAD_CONST               1 ('debug')
              6 CALL_FUNCTION            1
              8 POP_TOP
             10 JUMP_FORWARD             8 (to 20)

  7     >>   12 LOAD_GLOBAL              0 (print)
             14 LOAD_CONST               2 ('not debug')
             16 CALL_FUNCTION            1
             18 POP_TOP

  9     >>   20 LOAD_GLOBAL              0 (print)
             22 LOAD_CONST               3 ('NOT DEBUG')
             24 CALL_FUNCTION            1
             26 POP_TOP
             28 JUMP_FORWARD             8 (to 38)

 11          30 LOAD_GLOBAL              0 (print)
             32 LOAD_CONST               4 ('DEBUG')
             34 CALL_FUNCTION            1
             36 POP_TOP
        >>   38 LOAD_CONST               0 (None)
History
Date User Action Args
2019-07-05 21:02:56pablogsalsetrecipients: + pablogsal, scoder, nedbat, ned.deily, serhiy.storchaka, p-ganssle, miss-islington, xtreak, aldwinaldwin
2019-07-05 21:02:56pablogsalsetmessageid: <1562360576.34.0.601112273503.issue37500@roundup.psfhosted.org>
2019-07-05 21:02:56pablogsallinkissue37500 messages
2019-07-05 21:02:56pablogsalcreate