python - nested class access modifier
<p>I'm trying to make an instance of a <code>__Profile</code> class in the constructor of the <code>__Team</code> class, but I can't get access to <code>__Profile</code>. How should I do it?</p>

<p>This is my code</p>

<pre><code>class SlackApi:
    # my work
    class __Team:
        class __Profile:
            def get(self):
                # my work 
        def __init__(self, slackApi):
            self.slackApi = slackApi
            self.profile = __Profile()
            self.profile = __Team.__Profile()
            self.profile = SlackApi.__Team.__Profile()
            # I tried to all of these case, but I failed
            # I need to keep '__Team', '__Profile' class as private class
</code></pre>

<p>My python version is 3.5.1</p>

<p>You MAY access like so:</p>

<pre><code>SlackApi._SlackApi__Team._Team__Profile
</code></pre>

<p>or like so:</p>

<pre><code>self._Team__Profile
</code></pre>

<p>But that's just wrong. For your own convenience, don't make them a private class.</p>

python nested private python-3.5