Julia Louis-Dreyfus, who plays Vice President Selina Meyer on HBO’s “Veep,” which returns for its third season on Sunday. (Credit: Paul Schiraldi)

Spoiler alert: This post include plot details from the third season of “Veep.”

“There were lots of extras,” Armando  Iannucci, the creator of “Veep,” mused to me about a day he spent directing an episode of the HBO show’s upcoming third season. “And as I was getting back onto the set, one of them shouted ‘Armando!’ And I turned around. And he just said ‘I f—– your mom.’ And I said ‘I’m sorry?’ ‘I f—– your mom! I gather you like cursing!’ And I just thought this has gone too far. I was like, a) surprised that someone would say that to the director, but b) I also thought ‘That is such a bad use of cursing.’ Isn’t it? It’s so wrong. It made me realize you’ve got to put a lot of thought into the insults. They’re like drones. They’re precision-guided. They can only apply to that one person you’re throwing them at.”

 Iannucci may be famous for the wildly creative use of the profane he deployed in British political comedy “The Thick Of It” and its quasi-spin-off “In The Loop.” But that kind of intensely fine decision to detail, and not just about cussing, is what has made “Veep,” which returns Sunday night, the most incisive show about Washington in an increasingly crowded field.

As Vice President Selina Meyer (Julia Louis-Dreyfus) prepares to run for president again, her chief of staff,  Amy Brookheimer (Anna Chlumsky) and Dan Egan (Reid Scott) clash over who will be the campaign manager. Jonah Ryan (Timothy Simmons) gets fired from the administration and reemerges as a self-important blogger and an irritant to Selina’s campaign. And in a remarkably sharp subplot, Tracie Thoms turns up as Alicia, a universal daycare advocate who is wooed by Selina’s advisers, only to get caught up in the constantly shifting messaging of a campaign in its early days.

“Veep” is both funny and intensely naturalistic, a quality that can make it seem improvised. But in talking to Iannucci, it is clear just how intensive the writing process for “Veep” is. He works with writers including his long-time collaborator, the former critic David Quantick, and Ian Martin, who Iannucci describes as “very good about making the language of political debate suddenly become nonsensical.” While the show shoots in Baltimore, Iannucci keeps writers on call in the U.K. if jokes need punching up or dialogue needs rewriting.

That does not mean that actors aren’t intimately involved. To rehearse a scene in the second season where Selina and her ex-husband and daughter meet for a meal at a restaurant, Iannucci took the cast out for a dinner in character.

Before writing the third season, which takes Selina and her staff out on the hustings and away from the federal offices where they spent much of the first two seasons, Iannucci met with his actors to ask what they thought their characters’ biggest fears and ambitions are. The actors, in turn, had spent breaks during the previous season’s shooting meeting with people in Washington who have jobs like the ones their characters occupy, including chiefs of staff and communications director.

“I remember Anna saying that Amy’s worst nightmare would be hosting a dinner party with her staff,” Iannucci said. It was an insight Chlumsky drew from her meetings in Washington, with sources who told her “It’s kind of a lonely job because you are the chief of the staff, and everyone is under you. It’s difficult to socialize with them.” Dan, who is her rival for the job, is terrified that people might not like him, but his desire to be liked hampers his efficacy. And Tony Hale, the “Arrested Development” veteran who plays Selina’s body man, Gary Walsh, told Iannucci that Gary’s greatest anxiety is becoming physically unable to schlep the bag that holds all of Selina’s makeup and accessories. That fear made it into a running plot in the third season.

Editor's note: An earlier version of this video inaccurately stated the vice president's West Wing office is mostly used for formal events and interviews. The third season of HBO's White House comedy, "VEEP," premieres Sunday, complete with all the laughs and gaffes expected of Vice President Selina Meyer, played by Julia Louis-Dreyfus. How closely does the show mirror real life in the West Wing? (Julie Percha/The Washington Post)

That interest in political and psychological naturalism comes out in gags and in the characters’ language, Iannucci said. He regularly cuts lines when an actor suggests that a gesture might be more effective, citing Kevin Dunn, who plays White House chief of staff Ben Caffrey, as an actor who often obliterates dialogue with a shrug or a look.

Comedy, Iannucci noted, is often concerned with things going wrong, but the show has improved the way it calibrates those mishaps. In the first season, Selina did not come across as terribly good at her job, and was laid low by silly plot points like food poisoning from a local restaurant. But she has evolved to be more competent, in keeping with the actual power vice presidents have exercised in recent administrations. The task, Iannucci said, is “trying to keep her away from being just someone who walks into walls and falls over.….giving her a language and a dialogue that smacked of such knowledge of politics, making her sound confident.” Those skills show on the campaign trail this season, where Selina manages to balance the endless grind of signing books and talking to potential caucus-goers with her concerns about what is happening back in Washington.

And of course, there is the character-by-character attention to cursing.

“There are gradations,” Iannucci said. “Kent, Gary Cole’s character, we’ve made him never swear, because he sees himself as very controlled, and he’s got a lid on how he sees the world. For him to swear would sort of announce to the world that he’s not in control of his feelings and his beliefs…[Veteran and presidential candidate] Danny Chung (Randall Park) doesn’t swear that often, not because he doesn’t swear, but because he wants to come across as  someone who doesn’t swear. He would find it awkward if someone had heard him swearing…Ben [Caffrey (Kevin Dunn), the White House chief of staff]  he’s a basic swearer, he doesn’t bother to dress up in fancy phrases and stuff because he’s worn out by the whole experience. He doesn’t have time.” And for Selina, “it’s more, that language goes up at moments of stress. When she’s in control, I think you’d see less of that. It’s an indication of how well things are going.”

So how are they going when we rejoin Selina and her staff on Sunday at 10 PM? “No offense, you’re a catastrophe,” Selina snaps at her body man during a book signing in Iowa. By Iannucci’s standards, she — and “Veep” — are off to a terrific start