  A gauge invariant partition function is defined for gauge theories which
leads to the standard quantization. It is shown that the descent equations and
consequently the consistent anomalies and Schwinger terms can be extracted from
this modified partition function naturally.
