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


当前回答

 /**
   * Returns cookies according to the filters specified.
   * 
   * @return array  Cookies!  Nom nom nom nom nom.
   */
 public function data_getCookies($uid, $name) {

在facebook api的某个地方。

其他回答

我经常看到这种情况:

// TODO make this work

前段时间我看到:

raise InvalidChild() # e.g. no legs

这很奇怪,因为“inwalida”在波兰语中是残疾人的意思。愚蠢的我:)

aComment = 'this is not aComment' # this is aComment
class T(object):
    def f(this):
        this is not aComment

在LKM中:

/*
* Dear Richard Stallman,
*
* This one's for you.
*
* Sincerely,
* Me
*
*/
MODULE_LICENSE( "GPL" );

消毒:

//Forward declarations:

class X {}; // TODO: Remove {}  ! When we get X defined....