As part of a live question and answer session on the Guardian newspaper website, Neil Gaiman talked about the process of writing The Doctor's Wife, the episode that aired last weekend. And there was insight upon insight…

On why he used the Ninth/Tenth Doctor TARDIS set.

Because I came up with the story before the Year Four Specials aired, I was able to ask them to keep the Christopher Ecclestone TARDIS interior. It stood in the studio for an extra eighteen months, and they lied to anyone who came past about why it was still there.

On the line about Corsair being female a couple of times.

The odd bit here is that for me it had been definitively settled when Doctor Eleven tried to figure out whether or not he was a girl. But it seemed to make sense, and it made the Time Lords more interesting for me, not less, and I put it in the script, always as a throwaway. The description of the Corsair and the Doctor's relationship with him got shorter and shorter in script after script, but that aside remained, and I'm glad it did, if only because the next time the BBC needs to cast a Doctor, the press and fans get to argue passionately about twice as many actors. And for me, the definitive lady Doctor will always be Joanna Lumley. She had Dalek bumps.

On the origin of the story;

I've always wanted to go deeper into the TARDIS. Don't we all? The story actually came about backwards. It began with me wanting to do a story like THE MOST DANGEROUS GAME set in the TARDIS, with the Doctor being hunted. And then I thought, that's no fun, because he knows everything about the TARDIS. It's no contest. It would be more interesting to have a companion be hunted through the TARDIS… And I thought, Or even have something malevolent possess the TARDIS. But if I did that, I'd need to put the TARDIS consciousness somewhere. And then I had a story.

On writing Doctor Who in other media;

TV. Doctor Who is a TV show. (I said no whenever I was asked to write spin-off things when younger, frustrating the lovely people who did the Virgin New Adventures and the Telos Novellas and such, explaining that I wanted to write an episode of the show. Which may also have been my way of trying to hope the Doctor Who TV show back into existence.)

On changes to the story;

Yes, things changed when it slipped story arcs. It became Rory and Amy, not just Rory, which meant changing the way that the House toyed with them/kept them busy while it took over the TARDIS. It meant that the TARDIS was no longer trying to warn the Doctor about the events of The Big Bang, or how he could get out of it.

On the origins of Idris;

You know, in early drafts we learned a lot more about Idris, and she was imprisoned on the asteroid, and she didn't become the TARDIS until about 20 minutes in. But it only got interesting once she became the TARDIS. So we moved that stuff up. So much Auntie and Uncle etc backstory in my head and in previous scripts — and there was even a lot more that we shot. Adrian and Elizabeth were funny and creepy at the same time, and they had dialogue that indicated that normally the TARDISes when placed in human form say a few words then burn up and die: what our TARDIS did in Idris's body was unheard of. But then, it was too long, so those scenes, along with many wonderful Uncle and Auntie lines, went away.

On whether Corsair can be revived;

The Corsair's arm (kidneys, spleen etc) is on a bubble universe that reached Absolute Zero pretty quickly, destroying all the cells, Corsair DNA etc. Unless of course someone needs it for a future story, in which case it will have been perfectly preserved. But in my head, no, it's destroyed.

On Idris and House's status;

In almost all the drafts of the script until we reached shooting, they buried Idris's body. And in most of those drafts it was very clear that House had absolutely survived. Right now, it's a lot more ambiguous. But I like disembodied baddies. Something you can't see can be just as scary as things you can. (One of my favourite Doctor Who baddies as a child was the Great Intelligence, and House was as much a tip of the hat to that as it was a steal from Arthur Conan Doyle — WHEN THE WORLD SCREAMED — and a wave at my friend Harlan Ellison.

On regeneration limits;

It's interesting, that rule. It was obviously bendable to begin with (the Time Lords gave the Master a whole new round of regenerations). So I've always thought that it was more a law like a speed limit is a law than like Gravity is a law. And if there are no longer any police to make you observe the speed limit, you can drive as fast as you like. Although it's a lot more dangerous. And that's my opinion. As to what Mr Moffat thinks, he may either have a plan, or he may figure it's not his problem, but is one for eight or ten years down the line.

On "Pull To Open" and other script changes;

1) Yes, Pull to Open obviously refers to the hatch. But it is an instruction, and it is on her door, and Police Box doors did open out. (Opening in makes much more sense for a spaceship though.) 2) Yes, there were lots more TARDIS rooms in earlier versions of the script. I was particularly fond of the Zero Room sequence, with Rory having to learn to levitate, but alas, Zero Rooms and levitation cost money and take time to shoot, as do Swimming Pools and Halls of Mirrors, and we were all out of both at that point. However, now we have TARDIS corridors existing as standing sets. We never did before. And that means that other writers can use the corridors to go somewhere. Like the New Swimming Pool. Or the ballroom.