Myth: You can pull a gun and shoot a knife attacker before he can kill you if he's at least 20 feet away.
Fact: If the knife combatant is wearing a vest and already has the knife quietly drawn, he can kill 95% of even the top gun combat experts. Reason: in closing the distance, halfway there, your option to shoot to the head is gone or diminished. If you got even briefly stuck in clothing in your draw, had to chamber or take a safety off, had to set a trigger (eg. either mentally, or*on a revolver), you'll be dead. If you got a shot to his vest and he took your throat out, you lose. If you are a police officer and not trained in immediate head shots, you die. If your shot does not immediately sever his spine or motor cortex (very unlikely in a fast draw/shoot situation), he is VERY LIKELY NOT to miss your eyes or throat, as a knife is FAR more accurate and certain, in it's range, than a gun. The more highly trained you are with a gun the more danger you're in. First: Mozambique will waste two shots center mass and you'll be dead before you can get to the head shot. Second: "Highly trained" means you're constantly worried about the legal ramifications of shooting someone who is unarmed. If the knife thug screamed "I'm unarmed" and charged you, your external carotid, subclavian, throat or eyes will be severed by the time you decide you can shoot. Worst of all: a gun might tempt you to stand your ground, when the safest option was to get the hell out of there!
I agree with your myth, in fact recent research has pushed that out even farther. If you think drawing a folding knife even one with a wave in the situation is a better idea, I disagree. I can draw my handgun faster than I can a folding knife.
You loose me when you talk about Mozambique and being worried about shooting someone who is unarmed. You said they were armed with a knife in your original scenario and I have no idea who or what Mozambique is.