This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Naris R
Recipients Naris R
Date 2018-08-18.09:58:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za>
In-reply-to
Content
Example:

```
from typing import MutableSequence, TypeVar

CliffordGate = TypeVar('CliffordGate')

class QCircuit(MutableSequence[CliffordGate]):
    def __init__(self, gates):
        self.gates = list(gates)

    def __repr__(self):
        return f'{self.__class__.__name__}({self.gates})'
   
    def __getitem__(self, key):
        return self.gates[key]

    def __setitem__(self, key, item):
        self.gates[key] = item

    def __delitem__(self, key):
        del self.gates[key]

    def insert(self, key, item):
        self.gates.insert(key, item)

a = QCircuit(['H0', 'S2'])
a += a
```
History
Date User Action Args
2018-08-18 09:58:31Naris Rsetrecipients: + Naris R
2018-08-18 09:58:31Naris Rsetmessageid: <1534586311.51.0.56676864532.issue34427@psf.upfronthosting.co.za>
2018-08-18 09:58:31Naris Rlinkissue34427 messages
2018-08-18 09:58:31Naris Rcreate