order of words in python
<p>I have a code like:</p>

<pre><code>class &lt;name&gt;
{
public:
...
private:
...
};
</code></pre>

<p>I want to ensure that the public section is declared before the private section and not after that.One way of doing this in Python is by comparing the line numbers where these words occur.However,am not sure if this would work when I have several such sections(such declarations) in my code.Any other suggestions?</p>
