What's the pythonic way to set class variables?
<p>perhaps I'm asking the wrong question.  I have code like this:</p>

<pre><code>class ExpressionGrammar(Grammar):
  def __init__(self, nonterminals, terminals, macros, rules, precedence, nonterminal_name = '_expr'):
    self.nonterminals = nonterminals
    self.terminals = terminals
    self.rules = rules
    self.macros = macros
    self.precedence = precedence
    self.nonterminal = nonterminal
</code></pre>

<p>and I find it redundant to always have to to self.x = x.  I know python tries to avoid repetition, so what would be the correct way to do something like this?</p>
