@goodfeli I'm not making this up, I was thinking of this:
http://www.python.org/dev/peps/pep-0008/#comments

"Block comments generally apply to some (or all) code that follows them,
and are indented to the same level as that code. Each line of a block
comment starts with a # and a single space (unless it is indented text
inside the comment)."

I think we can all agree that the purpose of code review is to *do better
than* the crappy syntax and bad habits that were acceptable in the past
before we did code reviews.

Also, before you delete that regular expression that you used to find all
these counter-examples, consider plugging it into `sed` and fixing them.

On Thu, Aug 30, 2012 at 11:30 AM, goodfeli <notifications@github.com> wrote:

> In theano/gradient.py:
>
> > +def _populate_var_to_node_to_idx(outputs):
> > +    """
> > +        Common code shared between grad and grad_sources_inputs
> > +
> > +        outputs: a list of nodes we want to take gradients of
> > +
> > +        returns:
> > +            var_to_node_to_idx: a dictionary mapping a variable to
> > +                a second dictionary.
> > +                the second dictionary maps apply nodes acting on
> > +                this variable to the variable's index in the apply
> > +                node's input list
> > +
> > +    """
> > +
> > +    #var_to_node_to_idx[var][node] = [i,j] means node has
>
> The rest of the library has comments with exactly this same format and
> this isn't even flagged by the pep8 script. I think you're holding me to an
> unfair standard and wasting my time on something that's just your aesthetic
> opinion.
>
> theano/tensor/opt.py: #always a good idea to replace an alloc with
> multiple op.
> theano/tensor/opt.py: unary(x)[idx] -> unary(x[idx])#any broadcast pattern.
> theano/tensor/opt.py:#after priority 50 Destructive inplace operations
> theano/tensor/opt.py: #aaron value
> theano/tensor/blas.py: #at the very least, move the alpha inside the gemm*
> no_inplace
> theano/tensor/deprecated/rmodule.py: #and seeds each subcomponent that is
> an RModule
> theano/tensor/nnet/nnet.py: #add the bias vector to the i'th row of x
> theano/tensor/nnet/conv.py: #accept Constant value for image_shape and
> filter_shape.
> theano/tensor/basic.py: #and have the fct infer_shape() implemented in the
> op that convert
> theano/tensor/basic.py:#alias to sqr, included to maintain similarity with
> numpy interface
> theano/tensor/basic.py: #a == [0,1,2]
> theano/tensor/basic.py:#
> docs.scipy.org/doc/numpy/reference/arrays.indexing.html#advanced-indexing
> theano/scalar/basic_scipy.py:#as scipy is not always available, we put
> threat them separatly
> theano/sandbox/test_theano_object.py: self.c = 100 #a constant
> theano/sandbox/cuda/basic_ops.py: #alloc an output
> theano/sandbox/cuda/tests/test_conv_cuda_ndarray.py: , ((60,20,28,28),
> (10,20,5,5), (1, 1), (2,2), (1, 1))#added a test case that fail from
> test_nnet.py.test_conv_nnet2
> theano/sandbox/cuda/tests/test_basic_ops.py: #and this cause small
> rounding difference with some seed
> theano/sandbox/cuda/tests/test_basic_ops.py: #assert that the test was
> done on the gpu.
> theano/sandbox/cuda/tests/test_basic_ops.py: #assert that the test was
> done on the gpu.
> theano/sandbox/cuda/tests/test_memory.py: #assert mem2 == freemem(),
> (mem2, freemem())
> theano/sandbox/cuda/tests/test_bench_loopfusion.py: rval.input = input
> #add the input to the returned object
> theano/sandbox/cuda/tests/test_cuda_ndarray.py: #a[0, :, :] = mat
> theano/sandbox/cuda/tests/test_cuda_ndarray.py: #assert
> numpy.allclose(numpy.asarray(_a), a)
> theano/sandbox/cuda/type.py: #a sparce matrix, numpy.may_share_memory fail.
> theano/sandbox/cuda/opt.py: #as we currently only support float32, this
> can fail.
> theano/sandbox/test_neighbours.py: #assert
> numpy.allclose(images.get_value(borrow=True), g())
> theano/sandbox/test_neighbours.py: #assert
> numpy.allclose(images.get_value(borrow=True), g())
> theano/sandbox/rng_mrg.py: #and the second half by B with a modulo of m2
> theano/sandbox/test_rng_mrg.py: #avg_std = numpy.std(ival)
> theano/sandbox/test_rng_mrg.py: #avg_std = alpha * numpy.std(ival) +
> (1-alpha)*avg_std
> theano/sandbox/symbolic_module.py: #at this point there is a neural_net
> module all built and compiled,
> theano/sandbox/symbolic_module.py: #at this point there is a neural_net
> module all built and compiled,
> theano/sandbox/symbolic_module.py: #nnet_on_pca.include(PCA) #an
> already-instantiated Module
> theano/scan_module/tests/test_scan.py: ##assert numpy.allclose( theano_x0
> , vu2)
> theano/scan_module/tests/test_scan.py: #assert not numpy.allclose(
> theano_x0 , vu2[1:4])
> theano/scan_module/tests/test_scan.py: #assert numpy.allclose( theano_x1 ,
> vu1[0:3])
> theano/scan_module/scan_op.py: #assert len(inputs) >= len(self.inputs)
> theano/scan_module/scan_op.py: #args[-len(other_args):] )
> theano/misc/check_blas.py:#a,b scalar
> theano/misc/#check_blas.py#:#a,b scalar
> theano/sparse/sandbox/test_sp.py: #abspos = 0
> theano/sparse/sandbox/test_sp.py: #abspos+=1
> theano/sparse/sandbox/test_sp.py: #assert numpy.all(visref==visval)
> theano/sparse/basic.py: #are.
> theano/sparse/basic.py: #any gradient anywhere. but we know that at least
> one of
> theano/gof/destroyhandler.py: #add_impact(input_root, self.view_o,
> input_impact)
> theano/gof/optdb.py: #add all opt with this tag
> theano/gof/cc.py: #add the signature for this node
> theano/gof/cc.py: #already tied to another FunctionGraph.")
> theano/gof/opt.py: #added to override the list's __eq*_ implementation
> theano/gof/opt.py: #added to override the list's *neq* implementation
> theano/gof/opt.py: #apply global optimizer
> theano/gof/opt.py: #apply local optimizer
> theano/gof/fg.py: #a "workalike" so we could do actual error checking
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/894/files#r1497912>.
>
>