This is a bit of a tricky one, IMHO (especially, for me, because I am not – and nor do I pretend to be – a Python expert).
But, overall, I think this answer was deleted inappropriately. Maybe it's not a good answer, but it is every bit as much of an answer as this highly upvoted, other answer. Thus, I have voted to undelete.
Also, I generally feel that there is a tendency among some 20k+ users (though I'm not claiming this is the case here) to use a delete vote as some kind of "Super Downvote". This is not what deletion of answers is about: If you don't like an answer, then feel free to downvote it. However, by casting a delete vote, you are using a "Trusted User" privilege; and, as such, those votes should be used only with great caution/consideration, on answers that are clearly: (a) noise; (b) not answers (e.g., "Me too" and "Thanks"); (c) dangerous; or (d) otherwise inflicting damage on the site or on the Internet in general.
The answer under discussion, while maybe not directly answering the original question, does (IMHO) provide interesting (though, perhaps, controversial) insight into the issue raised.
You could put a comment in there to the effect of: