Not the same thing. "spam" & "eggs" are very neutral. If they used politically charged terms, and inserted example code like "if brains(republicans) == 0 # always true!" then the situation would be similar. The difference is between neutral light-heartedness and non-neutral political message.
In any case that question seems wildly unrelated to the question at hand, which is about a joke that's intended to be a present-day political reference.