I'm not sure. Removing part of the code like that might just lead to a CTD the next time the function is used.
Strictly speaking there are two things that could happen if this is done incorrectly.
The first possible error, and one I am relatively sure would happen is is if one was to simply delete the entire line blindly. That would provoke a XML error while loading the game as the file no longer properly matches the schema.
The second is if one is one that should not happen but might if the code in the DLL is not safely written. And that's if one was to delete the value of the ipyhtonCallback tag whilst leaving the tag it self in its open and closed state as opposed to replacing it with the valueless version </ipyhtonCallback>. This could potentially cause problems because even though, strictly speaking, the XML specification permits this as a valid state the DLL it self might be using the valueless tag variant as a sort of indicator to skip the line in which case it would simply read the empty value as being a blank string. And in theory this could lead to a situation where the DLL tries calling that empty string as if it was a valid function name and causing a crash that way.
But I say potentially and theoretically because proper programing practice places several safety checks along the way of that, either of which would prevent it from happening. So it would take quite the sloppy job for this to cause a crash. Not that I have not seen worse, mind you.
The 100% safe way to do it, and the way I did it, is to look at an event that has no python callback and than copy the appropriate lines over to this event making extra sure to not overwrite the wrong lines.
Also, sorry for the wall of text. But I happen to be a computer programmer you see so this is sort of my profession and passion.
By the way, winning the game in 771AD is not how the game is supposed to work. In theory, you should be halfway through middle age by that time. Which gamespeed and map size were you playing?
Why should you not be able to win half way through the middle ages? There are plenty of victories including religious and cultural that you can snag by than.
Especially religious because, for some reason the AI really does not like to build missionaries of its own. So even when they found a religion they rely entirely on passive spread which is a joke. So all I did was beeline for a religion until I managed to get one (and got a hold of Aztec polytheism) and than aggressively spread it to everyone who has open borders with me.
Some smooth diplomacy, lots of gifts and sucking up, and lots of missionaries later and I had 17 out of the 20 civs on the map sacrificing their children to the winged serpent.
As for my game stats it's the second to largest map size, what ever that is, 20 civs, second to slowest game speed (IIRC). And yes, I was half way through the middle ages. Really though what I think made the difference was that, through an accidental scrolling error in the game setup screen I ended up not with custom continents as I wanted but with that odd map script where everyone is in a ring around a circle of mountains in the middle. And that meant I had an unobstructed land route to everyone.