你遇到过的源代码中最好的注释是什么?


当前回答

这个我在Python 2.5的“twisted”包中找到的(文件是tcp.py在第371行)

# Limit length of buffer to try to send, because some OSes are too
# stupid to do so themselves (ahem windows)
return self.socket.send(buffer(data, 0, self.SEND_LIMIT))

其他回答

# let's pretend we are free, for a while

在教室前面发现了这个。接下来是一个(天真的)实现ORM的尝试。我还是不明白他为什么这么写。

//Abandon all hope ye who enter beyond this point
//I am not sure why this works but it fixes the problem. 

这是之前的一组代码,技术上确实解决了问题,它的意思是,但打破了其他3个东西....

If you have reached this part in the code, then this program sucks.
// This condition can't happen. Call the police or something.