python use __getitem__ for a method
<p>is it possible to use <strong>getitem</strong> inside a method, ie</p>

<pre><code>Class MyClass:
    @property
    def function(self):
        def __getitem__():
            ...
</code></pre>

<p>So I can do</p>

<pre><code>A = MyClass()
A.function[5]
A.function[-1]
</code></pre>
