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

All Samples(7646)  |  Call(7646)  |  Derive(0)  |  Import(0)
L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
cmp(x, y) -> -1, 0, 1

src/p/o/pourover-HEAD/buster/lib/django/contrib/gis/geos/mutable_list.py   pourover(Download)
    def sort(self, cmp=None, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            if cmp is not None:
                temp.sort(cmp=cmp, reverse=reverse)
                temp.sort(cmp=cmp, reverse=reverse)
            else:
                temp.sort(reverse=reverse)
            self[:] = temp
 

src/t/e/TEES-HEAD/ExampleBuilders/EdgeExampleBuilder.py   TEES(Download)
            types.add(intEdge[2].get("type"))
        types = list(types)
        types.sort()
        categoryName = ""
        for name in types:
            types.add(interaction[2].get("type"))
        types = list(types)
        types.sort()
        categoryName = ""
        for name in types:

src/e/v/everest-HEAD/everest/utils.py   everest(Download)
    def sort(self):
        list.sort(self, key=self.__cmp_key)
 
    def __get_weakref(self, value):
        return ref(value, self.__remove_by_weakref)

src/s/n/SNAKES-0.9.17/snakes/hashables.py   SNAKES(Download)
    def sort (self, cmp=None, key=None, reverse=False) :
        self.__mutable__()
        list.sort(self, cmp, key, reverse)
 
hlist = hashable(hlist)

src/t/r/triaquae-HEAD/TriAquae/models/django/contrib/gis/geos/mutable_list.py   triaquae(Download)
    def sort(self, cmp=None, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            if cmp is not None:
                temp.sort(cmp=cmp, reverse=reverse)
                temp.sort(cmp=cmp, reverse=reverse)
            else:
                temp.sort(reverse=reverse)
            self[:] = temp
 

src/t/e/TEES-HEAD/ExampleBuilders/EntityExampleBuilder.py   TEES(Download)
                entityIds.add(entity.get("id"))
        types = list(types)
        types.sort()
        typeString = ""
        for type in types:

src/s/p/splunk-webframework-HEAD/contrib/django/django/contrib/gis/geos/mutable_list.py   splunk-webframework(Download)
    def sort(self, cmp=None, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            if cmp is not None:
                temp.sort(cmp=cmp, reverse=reverse)
                temp.sort(cmp=cmp, reverse=reverse)
            else:
                temp.sort(reverse=reverse)
            self[:] = temp
 

src/t/e/TEES-HEAD/ExampleBuilders/FeatureBuilders/TriggerFeatureBuilder.py   TEES(Download)
            types.add(entity.get("type"))
        types = list(types)
        types.sort()
        typeString = ""
        for type in types:

src/p/y/pyggs-HEAD/plugins/gccz_myratings_top10.py   pyggs(Download)
 
        caches = list(caches.values())
        caches.sort(key=lambda x: int(x["myrating"]) + (int(x["rating"]) - int(x["deviation"])/1000)/1000, reverse=True)
        return caches
 

src/s/y/sympy-0.7.5/sympy/printing/repr.py   sympy(Download)
    def _print_PolyElement(self, poly):
        terms = list(poly.terms())
        terms.sort(key=poly.ring.order, reverse=True)
        return "%s(%s, %s)" % (poly.__class__.__name__, self._print(poly.ring), self._print(terms))
 
    def _print_FracElement(self, frac):
        numer_terms = list(frac.numer.terms())
        numer_terms.sort(key=frac.field.order, reverse=True)
        denom_terms = list(frac.denom.terms())
        denom_terms.sort(key=frac.field.order, reverse=True)

Previous  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16  Next