 <p>Python does not have "enforced" private functions, but it does have a naming convention that makes it harder to do <em>accidentally</em>. This is usually done by prepending a <em>double</em> underscore (not, as in your example, a single one, which functions as a normal method name). For example:</p> <pre><code>class X(object): def __f(self): print('hello') </code></pre> <p>If I attempt to use the same name this outside the class definition, it will fail:</p> <pre><code>&gt;&gt;&gt; x = X() &gt;&gt;&gt; x.__f() Traceback (most recent call last): File "test.py", line 7, in &lt;module&gt; x.__f() AttributeError: 'X' object has no attribute '__f' </code></pre> <p>Instead, Python uses <code>_ClassName__PrivateMethod</code>. I can <em>still</em> call this pseudo-private function outside the class definition using the following:</p> <pre><code>&gt;&gt;&gt; x._X__f() hello </code></pre> <p>See <a href="http://stackoverflow.com/questions/70528/why-are-pythons-private-methods-not-actually-private">Why are Python&#39;s &#39;private&#39; methods not actually private?</a> for some more useful information.</p> <p>Note, of course, that just because something is <em>possible</em> does not mean it is a <em>good idea</em>. There is a reason why a well-designed class has private functions: these are internals that are not meant to be safely interacted with by outside functions.</p>