This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients cool-RR, ethan.furman, martin.panter, terry.reedy, veky
Date 2020-02-28.23:01:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582930870.02.0.860513717486.issue39717@roundup.psfhosted.org>
In-reply-to
Content
While I have no specific opinion on tarfile, I strongly disagree with a blanket prohibition on 'from None'.  Its proper use is to maintain a defined API and hide irrelevant implementation details.  Realistic toy example:

def f(x, y):
    "Return (x+y)/y for non-zery y."

    if y == 0:  # Body 1: look ahead.
        raise ValueError('y cannot be 0')
    else:
        return (x+y)/y
# or
    try:  # Body 2: leap first.
        return (x+y)/y
    except ZeroDivisionError:
        raise ValueError('y cannot be 0') from None

'from e' instead of 'from None' would just add distracting noise.
History
Date User Action Args
2020-02-28 23:01:10terry.reedysetrecipients: + terry.reedy, cool-RR, ethan.furman, martin.panter, veky
2020-02-28 23:01:10terry.reedysetmessageid: <1582930870.02.0.860513717486.issue39717@roundup.psfhosted.org>
2020-02-28 23:01:10terry.reedylinkissue39717 messages
2020-02-28 23:01:09terry.reedycreate