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

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)
get(key[, default=None]) -> Value for key or default

Return the value or the default if the key is not found.

src/d/o/dolmen.relations-0.5/src/dolmen/relations/container.py   dolmen.relations(Download)
    def __delitem__(self, key):
        relation = self.get(key, None)
        if relation is not None:
            # If the key doesn't exists, nothing should happens. This
            # case can be triggered if you set a subscribers to
            # IRelationTargetDeletedEvent that end-up somehow deleting
            # the relation
            notify(events.RelationDeletedEvent(self.get(key)))

src/e/r/erp5-HEAD/product/ERP5Type/patches/BTreeFolder2.py   erp5(Download)
              meta_type = getattr(object, 'meta_type', None)
              if meta_type is not None:
                  ids = mt_index.get(meta_type, None)
                  if ids is None:
                      ids = OIBTree()

src/i/n/indico-HEAD/indico/MaKaC/conference.py   indico(Download)
        except AttributeError:
            self._authors = OOBTree()
        return self._authors.get( authorId.strip(), None )
 
    def isAuthor(self, part):
        except AttributeError:
            self._abstracts = OOBTree()
        return self._abstracts.get(str(id).strip())
 
    def hasAbstract( self, abstract ):

src/e/r/erp5-HEAD/product/ERP5Wizard/PAS/ERP5RemoteUserManager.py   erp5(Download)
              'used local cache', error=True)
            stored_encrypted_password = self.remote_authentication_cache.get(
               login, None)
            result = int(stored_encrypted_password is not None and pw_validate(
              stored_encrypted_password, password))
                # successfully logged in
                stored_encrypted_password = self.remote_authentication_cache\
                    .get(login, None)
                if stored_encrypted_password is None or \
                   not pw_validate(stored_encrypted_password, password):

src/p/l/plone.app.layout-2.5.1/plone/app/layout/sitemap/sitemap.py   plone.app.layout(Download)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)

src/p/l/plone.app.layout-HEAD/plone/app/layout/sitemap/sitemap.py   plone.app.layout(Download)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)

src/c/o/collective.linguasitemap-1.0/collective/linguasitemap/browser/sitemap.py   collective.linguasitemap(Download)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)
            # Comparison must be on GMT value
            modified = (date.micros(), date.ISO8601())
            default_modified = default_page_modified.get(loc, None)
            if default_modified is not None:
                modified = max(modified, default_modified)

src/z/t/ztfy.thesaurus-0.2.16.1/src/ztfy/thesaurus/loader/__init__.py   ztfy.thesaurus(Download)
            new_term = key_store[key]
            if term.generic:
                target = key_store.get(term.generic)
                if target is None:
                    target = ThesaurusTerm(label=term.generic)
            if term.specifics:
                for specific in term.specifics:
                    if key_store.get(specific) is None:
                        target = ThesaurusTerm(label=specific)
                        alsoProvides(target, IThesaurusLoaderTerm)
                        key_store[target.label] = store[target.label] = target
                new_term.specifics = [key_store.get(specific) for specific in term.specifics]
            if term.associations:
                for association in term.associations:
                    if key_store.get(association) is None:
                        target = ThesaurusTerm(label=association)
                        alsoProvides(target, IThesaurusLoaderTerm)
                        key_store[target.label] = store[target.label] = target
                new_term.associations = [key_store.get(association) for association in term.associations]

src/p/r/Products.AdvancedQuery-3.0.3/Products/AdvancedQuery/sorting.py   Products.AdvancedQuery(Download)
        try: k = keyFor(doc)
        except KeyError: noValue.insert(doc); continue
        l = m.get(k)
        if l is None: l = m[k] = IITreeSet()
        l.insert(doc)