Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(516)  |  Call(516)  |  Derive(0)  |  Import(0)
x.__getitem__(y) <==> x[y]

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/datastructures.py   gae-twitter-oauth-example(Download)
        if isinstance(key, basestring):
            return self.quality(key)
        return list.__getitem__(self, key)
 
    def quality(self, key):

src/h/u/hunch-sample-app-HEAD/django/utils/dictconfig.py   hunch-sample-app(Download)
    def __getitem__(self, key):
        value = list.__getitem__(self, key)
        result = self.configurator.convert(value)
        #If the converted value is different, save for next time
        if value is not result:

src/w/e/web-logging-example-HEAD/logconfig/dictconfig.py   web-logging-example(Download)
    def __getitem__(self, key):
        value = list.__getitem__(self, key)
        result = self.configurator.convert(value)
        #If the converted value is different, save for next time
        if value is not result:

src/p/y/pycollada-0.4/collada/util.py   pycollada(Download)
    def __delitem__(self, ind):
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
            obj = self._index[ind]
            if isinstance(ind, str):
                raise
            return list.__getitem__(self, ind)
 
    def get(self, key, default=None):
    def __setitem__(self, ind, new_obj):
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
            obj = self._index[ind]
    def insert(self, ind, new_obj):
        # ensure that ind is a numeric index
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
    def pop(self, ind= -1):
        # ensure that ind is a numeric index
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):

src/p/y/pycollada-HEAD/collada/util.py   pycollada(Download)
    def __delitem__(self, ind):
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
            obj = self._index[ind]
            if isinstance(ind, str):
                raise
            return list.__getitem__(self, ind)
 
    def get(self, key, default=None):
    def __setitem__(self, ind, new_obj):
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
            obj = self._index[ind]
    def insert(self, ind, new_obj):
        # ensure that ind is a numeric index
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):
    def pop(self, ind= -1):
        # ensure that ind is a numeric index
        try:
            obj = list.__getitem__(self, ind)
        except (IndexError, TypeError):

src/s/n/SNAKES-0.9.17/snakes/hashables.py   SNAKES(Download)
    def __getitem__ (self, item) :
        ret = list.__getitem__(self, item)
        if ret.__class__ is list :
            return self.__class__(ret)
        return ret

src/p/a/pattern-2.6/pattern/db/__init__.py   Pattern(Download)
        """
        if isinstance(index, tuple):
            list.__getitem__(self, index[0])[index[1]] = value
        elif isinstance(index, int):
            self.pop(index)
        if isinstance(index, (int, slice)):
            # Datasheet[i] => row i.
            return list.__getitem__(self, index)
        if isinstance(index, tuple):
            i, j = index
            # Datasheet[i,j] => item from column j in row i.
            # Datasheet[i,j1:j2] => columns j1-j2 from row i.
            if not isinstance(i, slice):
                return list.__getitem__(self, i)[j]
            # Datasheet[i1:i2,j] => column j from rows i1-i2.
            if not isinstance(j, slice):
                return [row[j] for row in list.__getitem__(self, i)]
            # Datasheet[i1:i2,j1:j2] => Datasheet with columns j1-j2 from rows i1-i2.
            return Datasheet(
                  rows = (row[j] for row in list.__getitem__(self, i)),

src/p/a/pattern-HEAD/pattern/db/__init__.py   pattern(Download)
        """
        if isinstance(index, tuple):
            list.__getitem__(self, index[0])[index[1]] = value
        elif isinstance(index, int):
            self.pop(index)
        if isinstance(index, (int, slice)):
            # Datasheet[i] => row i.
            return list.__getitem__(self, index)
        if isinstance(index, tuple):
            i, j = index
            # Datasheet[i,j] => item from column j in row i.
            # Datasheet[i,j1:j2] => columns j1-j2 from row i.
            if not isinstance(i, slice):
                return list.__getitem__(self, i)[j]
            # Datasheet[i1:i2,j] => column j from rows i1-i2.
            if not isinstance(j, slice):
                return [row[j] for row in list.__getitem__(self, i)]
            # Datasheet[i1:i2,j1:j2] => Datasheet with columns j1-j2 from rows i1-i2.
            return Datasheet(
                  rows = (row[j] for row in list.__getitem__(self, i)),

src/p/y/py2neo-1.6.4/py2neo/packages/urimagic/kvlist.py   py2neo(Download)
 
        """
        got = list.__getitem__(self, index)
        if isinstance(index, slice):
            return KeyValueList(got)
            return KeyValueList(list.__getslice__(self, start, end))
        except AttributeError:
            return KeyValueList(list.__getitem__(self, slice(start, end)))
 
    def __setitem__(self, index, item):

src/w/e/weakreflist-0.2/weakreflist/weakreflist.py   weakreflist(Download)
    def _getRef(self, value):
        value = self._makeRef(value)
        if list.__contains__(self, value):
            value = list.__getitem__(self, list.index(self, value))
        return value
    def __getitem__(self, key):
        return self._getValue(list.__getitem__(self, key))
 
    def __setitem__(self, key, value):
        return list.__setitem__(self, key, self._getRef(value))

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next