Even so, electric cars are still less efficient, so we'd be worse off. There's at least one[1] study (of the batteries for the Ford Focus) which found that they resulted in 39% more CO2 emissions than the ICE version.
When you say they "left out the petrol", are you assuming that a better analysis would assume that the petrol is never made in the first place?
I mean, that might be the wish but we don't yet live in a world where the gas will stay in the ground if we don't use it to fuel one automobile at the margin.
If it's you as a consumer buying the next car to be produced, then it is entirely appropriate to compare it that way, because your single purchase will not change the entire life cycle.