Variable with name `None`
<p>I need to have a variable with name <code>None</code>:</p>

<pre><code>class QAbstractPrintDialog(QDialog):
    None = int() # QAbstractPrintDialog.PrintDialogOption enum
    PrintToFile = int() # QAbstractPrintDialog.PrintDialogOption enum
    PrintSelection = int() # QAbstractPrintDialog.PrintDialogOption enum
    ...
</code></pre>

<p>But:</p>

<blockquote>
  <p>syntax error: cannot assign to None</p>
</blockquote>

<p>I need the name to be <code>None</code>. I thought this will work:</p>

<pre><code>QAbstractPrintDialog.None = int() # QAbstractPrintDialog.PrintDialogOption enum
</code></pre>

<p>But it didn't. Is there a workaround to not have a syntax error?
Solutions like setattr don't work for me - this code will be parsed to extract classes, functions, arguments, etc.</p>

<p>Python 2.6, 2.7</p>

<p><strong>EDIT:</strong></p>

<p>I am helping a guy to write pseudo-Python modules which contain description of Qt classes. <code>QAbstractPrintDialog</code> is one of the classes and it has <code>enum QAbstractPrintDialog::PrintDialogOption</code> (http://doc.trolltech.com/latest/qabstractprintdialog.html). One of the enums is None. I can easily reference a <code>None</code> attribute via <code>QAbstractPrintDialog.None</code> but i can not set it. <code>int()</code> means the type of the attribute.</p>

<p>See here: <a href="http://scummos.blogspot.com/2011/06/kdevelop-python-language-support-plugin.html" rel="nofollow">http://scummos.blogspot.com/2011/06/kdevelop-python-language-support-plugin.html</a></p>
