Is it O.K. to punch a Nazi?

That is not a brainteaser or a hypothetical question posed by a magazine on Twitter. It is an actual question bouncing around the internet after an attack on a well-known far-right activist, Richard B. Spencer, in Washington after the inauguration of Donald J. Trump as president on Friday.

Mr. Spencer, who is credited with coining the term alt-right and describes himself as an “identitarian,” was punched in the head on Inauguration Day by a person clad in black as he was being interviewed by a journalist. At the time of the attack, Mr. Spencer was explaining the meaning of Pepe the Frog, a cartoon figure adopted as a mascot by the alt-right, a racist, far-right fringe movement that is anti-immigrant, anti-Semitic and anti-feminist. Video of the attack shows Mr. Spencer reeling to one side under the force of the blow and his attacker darting through a crowd after landing the punch.