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/d/j/django-old-HEAD/django/contrib/gis/geos/mutable_list.py   django-old(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

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

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

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

src/s/a/sage-HEAD/src/sage/rings/polynomial/infinite_polynomial_element.py   sage(Download)
                    V.extend([str(x) for x in arg._p.variables()])
        V=list(set(V))
        V.sort(cmp=self.parent().varname_cmp,reverse=True)
        if V:
            from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
        ## hence, their parent is not simply the underlying ring.
        VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names())))
        VarList.sort(cmp=self.parent().varname_cmp,reverse=True)
        if VarList:
            from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
        ## hence, their parent is not just the underlying ring.
        VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names())))
        VarList.sort(cmp=self.parent().varname_cmp,reverse=True)
        if VarList:
            from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
        ## hence, their parent is not just the underlying ring.
        VarList = list(set(self._p.parent().variable_names()).union(x._p.parent().variable_names()))
        VarList.sort(cmp=self.parent().varname_cmp,reverse=True)
        if VarList:
            from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
            copyVars = copy.copy(newVars)
            newVars = list(set(list(self._p.parent().variable_names())+newVars))
            newVars.sort(cmp=self.parent().varname_cmp, reverse=True)
            if newVars == list(self._p.parent().variable_names()):
                newR = self._p.parent()

src/d/j/Django-non-rel-for-Google-App-Engine-on-Python-2.7-HEAD/django/contrib/gis/geos/mutable_list.py   Django-non-rel-for-Google-App-Engine-on-Python-2.7(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

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

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

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

src/h/u/hunch-gift-app-HEAD/django/contrib/gis/geos/mutable_list.py   hunch-gift-app(Download)
    def sort(self, cmp=cmp, key=None, reverse=False):
        "Standard list sort method"
        if key:
            temp = [(key(v),v) for v in self]
            temp.sort(cmp=cmp, key=lambda x: x[0], reverse=reverse)
            self[:] = [v[1] for v in temp]
        else:
            temp = list(self)
            temp.sort(cmp=cmp, reverse=reverse)

Previous  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10  Next