]> granicus.if.org Git - python/commit
Swap 'if' branches so content matches to condition in importlib example (GH-14947)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Jul 2019 17:27:59 +0000 (10:27 -0700)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2019 17:27:59 +0000 (10:27 -0700)
commitc594c274e92dc66afad02fe7a3c08a9b6c5a396d
treed786fe9fba5c96d14dc2259da3d813b88b292025
parent25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17
Swap 'if' branches so content matches to condition in importlib example (GH-14947)

Prior to this change the guard on an 'elif' used an assignment expression whose value was used in a later 'else' block, causing some confusion for people.

(Discussion on Twitter: https://twitter.com/brettsky/status/1153861041068994566.)

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 544fa15ea1b7b73068319bdb217b684e2fd7bacc)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Doc/library/importlib.rst