In reading thorough the syntax defined <a href="http://docs.python.org/py3k/reference/compound_stmts.html#class-definitions" target="_blank">in the reference</a>, the class statement has surprised me.<div><br></div><div>It says that the inheritance part of the class can accept comprehensions. What does this mean?</div>
<div>I've tried:</div><div>"class A(x for x in ()): pass"</div><div>but this doesn't need the extra clause as "x for x in ()" is an expression, and thus this evaluates:</div><div>"class A(x for x in (),): pass"</div>
<div>although again it won't be a valid class anytime soon.</div><div><br></div><div>So what is this clause for?</div>