According to source novelist John le Carré, the character of Rick Pym (Ray McAnally) is heavily based upon his own father.
This mini-series was made and released only about a year after its source novel of the same name by John le Carré was first published in 1986.
The synopsis of this mini-series source novel "A Perfect Spy" (1986) by John le Carré on his personal website reads: "Magnus Pym, ranking diplomat, has vanished, believed defected. The chase is on: for a missing husband, a devoted father, and a secret agent. Pym's life, it is revealed, is entirely made up of secrets. Dominated by a father who is also a confidence trickster on an epic scale, Pym has from the age of seventeen been controlled by two mentors.
It is these two, racing each other and time itself, who are orchestrating the search to find the perfect spy...".
The Wikipedia website states: "A Perfect Spy [1986] is [John] le Carré's most autobiographical book. As the author himself has admitted, a large part of the novel is a thinly disguised account of le Carré's own early life. Before he became a novelist, David Cornwell (John le Carré) was an intelligence officer for MI6, the British intelligence service, although there are no allegations that he ever betrayed his country and spied for another country like the character Magnus Pym. Like Magnus, le Carré lost his mother at an early age, was sent to an abusive prep school, studied languages at the University of Berne in Switzerland, in the 1950s worked for the Intelligence Corps of the British Army in Austria interrogating Czech defectors, and at Oxford University spied on far-left student groups for MI5."
Third BBC mini-series adapted from a John le Carré novel. The first and second were "Tinker Tailor Soldier Spy (1979)" and "Smiley's People (1982)."