Despite acres of publicity from a pair of well-staged riots and a tailor-made slum constituency, Britain's left and right extremists took a bad beating at the polls in Birmingham yesterday.

Inner-city voters there, ignoring radical and racist appeals alike, to give Labor's candidate, John Sever, an vacant parliamentary seat, The district, Ladywood, is a concrete jungle of high-rise public housing and derelict warrens. It was traditionally been a "safe" seat for Labor.

But Prime Minister James Callaghan's struggle with the worst inflation developed Europe and rising unemployment have made any Labor seat vulnerable. Lady wood was even more uncertain after a riot there Monday and another in London on Saturday had pited the radical Socialist Workers Party against athe racist National Front.

But put up candidates in Lady-wood and both expected a strong showing.The socialist workers party, which had fought and injured more than a hundred policemen to get at Front demonstrators, counted on Ladywood's large Asian population to regard the government and its agents as guardians of racists.

But Ladywod's Indian, Pakistani and West Indian Immigrants - about 40 per cent of the district - spurned the bait and gave the socialist workers' man only 152 votes, about 1 per cent. Another extreme leftist from the International Marxist Group did a little better, 534 votes or 3.4 per cent.

The National Front has been scoring as high as 20 per cent in some local elections, gaining bitter and jobless white workers who blame immigrants for their plight. Thursday, however, the Front took only 888 about 6 per cent.

As the results were announced in a town hall, the International Maxist candidate, Raghib Ansan, jumped on his Front rival, a lawyer named Anthony Reid-Herbert, and began punching him. Reid-Herbert lost his glasses in the scuffle.

Most Ladywood voters, 60 per cent, stayed at home. Those that did turn out gave Sever 8,227 votes, a 54 per cent of the total, and twice that of his Conservative opponent.

All the extremists, left and right, had hoped to strip away enough disaffected workers from Labor to give the Tory an upset. They did not come close.

Another big loser was the Liberal Party, whose candidate got 100 votes fewer than the National Front. This will not make Prime Minister Callaghan unhappy. Now the 13 Liberals in Parliament are likely to be more frightened than ever of getting crushed in a national election, so Callaghan and Labor can probably bank on the continuing Liberal support that they need for majority control of Parliament.

It now appears thrt Callaghan can be dislodged against his will only by defections from Labor's right or left flanks.

Ironically, Callaghan was largely responsible for the vacant Birmingham seat. When his son-in-law, Peter Jay, went to Washington as ambassador, Jay left open an attractive job announcing independent television's Sunday show on current affairs. So the Ladywood member of Parliament, Brian Walden, abandoned his frustrated political career to take over Jay's TV spot.