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


当前回答

刚刚在一些Actionscript中发现了这个,我必须更新…

/*
* spaghetty code in this module.
* hardcoded variables for load paths for the content window.
* Needs (vast) improvement.
*/

..大:(

其他回答

这个我在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))
//Not a bug, parameter position can change..., if you think this is wrong, you are in fact wrong.

从Python / ceval.c:

/* This is gonna seem *real weird*, but if you put some other code between
   PyEval_EvalFrame() and PyEval_EvalCodeEx() you will need to adjust
   the test in the if statements in Misc/gdbinit (pystack and pystackv). */
catch (Exception ex)
{ 
    // just die already.
}

回到《Hitchhiker’s Guide》刚问世的时候,我曾经测试过某些内容是否可滚动,以及用户是否尝试着滚动,这是一种限制可变长度的语言。所以:

if (scroll and noScroll) # or tea and no tea