Did I find the right examples for you? yes no

All Samples(120)  |  Call(96)  |  Derive(0)  |  Import(24)
Checks if a value is a list containing elements of the specified type.

Use with ``isinstance()`` as in::

    isinstance(X, listof(T))

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/flow.py   HTSQL(Download)
 
 
from ..util import (maybe, listof, tupleof, Clonable, Hashable, Printable,
                    cachedproperty)
from ..entity import TableEntity, ColumnEntity, Join
    def __init__(self, seed, ground, kernels):
        assert isinstance(seed, Flow)
        assert isinstance(ground, Flow)
        assert ground.is_axis and seed.concludes(ground)
        assert isinstance(kernels, listof(Code))
        assert seed.spans(base)
        assert not base.spans(seed)
        assert isinstance(kernels, listof(Code))
        assert isinstance(companions, listof(Code))
        # Find an ancestor of `seed` that is spanned by `base`.
    def __init__(self, base, binding, companions=[]):
        assert isinstance(base, Flow)
        assert base.family.is_quotient
        assert isinstance(companions, listof(Code))
        super(ComplementFlow, self).__init__(

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/binding.py   HTSQL(Download)
 
 
from ..util import maybe, listof, tupleof, Clonable, Printable, Hashable
from ..entity import TableEntity, ColumnEntity, Join
from ..domain import (Domain, VoidDomain, BooleanDomain, ListDomain,
    def __init__(self, base, joins, syntax):
        assert isinstance(joins, listof(Join)) and len(joins) > 0
        super(ChainBinding, self).__init__(base, joins[-1].target, syntax)
        self.joins = joins
 
    def __init__(self, base, seed, kernels, syntax):
        assert isinstance(seed, Binding)
        assert isinstance(kernels, listof(Binding))
        super(QuotientBinding, self).__init__(base, EntityDomain(), syntax)
        self.seed = seed
    def __init__(self, base, kernels, syntax):
        assert isinstance(kernels, listof(Binding))
        super(ForkBinding, self).__init__(base, base, syntax)
        self.kernels = kernels
 
    def __init__(self, base, seed, images, condition, syntax):
        assert isinstance(images, listof(tupleof(Binding, Binding)))
        assert isinstance(condition, maybe(Binding))
        if condition is not None:
            assert isinstance(condition.domain, BooleanDomain)

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/frame.py   HTSQL(Download)
 
 
from ..util import listof, tupleof, maybe, Clonable, Hashable, Printable
from ..entity import TableEntity, ColumnEntity
from ..domain import Domain, BooleanDomain
    def __init__(self, kids, term):
        # Sanity check on the arguments.
        assert isinstance(kids, listof(Frame))
        assert isinstance(term, Term)
        super(Frame, self).__init__(term.expression)
        # thus an instance of `BranchFrame` could actually be a leaf
        # in the frame tree!
        assert isinstance(include, listof(Anchor))
        # Check that the join condition on the first subframe is no-op.
        if include:
            assert isinstance(include[0], LeadingAnchor)
        assert isinstance(embed, listof(NestedFrame))
        assert isinstance(select, listof(Phrase)) and len(select) > 0

src/h/t/HTSQL-2.3.3/src/htsql/core/syn/syntax.py   HTSQL(Download)
 
 
from ..util import (maybe, listof, oneof, Clonable, Hashable, Printable,
        to_name, to_literal)
import re
    def __init__(self, larms, rarms):
        assert isinstance(larms, listof(oneof(IdentifierSyntax,
                                              ReferenceSyntax)))
        assert len(larms) > 0
        assert isinstance(rarms, maybe(listof(oneof(IdentifierSyntax,
    def __init__(self, name, arguments):
        assert isinstance(name, unicode)
        assert isinstance(arguments, listof(Syntax))
        self.name = name
        self.arguments = arguments
    def __init__(self, identifier, arms):
        assert isinstance(identifier, IdentifierSyntax)
        assert isinstance(arms, listof(Syntax))
        super(FunctionSyntax, self).__init__(identifier.name, arms)
        self.identifier = identifier

src/h/t/HTSQL-2.3.3/src/htsql/core/domain.py   HTSQL(Download)
 
 
from .util import (maybe, oneof, listof, Clonable, Hashable, Printable,
        TextBuffer, to_literal, urlquote, isfinite)
import re
    def __init__(self, labels):
        assert isinstance(labels, listof(unicode))
        self.labels = labels
 
    def __basis__(self):
        """
        assert isinstance(name, maybe(oneof(str, unicode)))
        assert isinstance(fields, listof(maybe(oneof(str, unicode))))
 
        # Check if the type has been generated already.
    def __init__(self, fields):
        assert isinstance(fields, listof(Profile))
        self.fields = fields
    def __basis__(self):
        return (tuple(self.fields),)
    def __init__(self, labels):
        assert isinstance(labels, listof(Domain))
        self.labels = labels
        # Find the number of and the paths to leaf labels.
        self.width = 0

src/h/t/HTSQL-2.3.3/src/htsql/core/syn/grammar.py   HTSQL(Download)
 
 
from ..util import (maybe, oneof, listof, omapof, trim_doc, toposort, omap,
        TextBuffer, Printable)
from ..error import Error, Mark, parse_guard, point
    def __init__(self, arms):
        assert isinstance(arms, listof(Pattern)) and len(arms) >= 1
        self.arms = arms
 
    def __unicode__(self):
    def __init__(self, arms):
        assert isinstance(arms, listof(Pattern)) and len(arms) >= 1
        self.arms = arms
 
    def __unicode__(self):
    def __init__(self, name, regexp, groups):
        assert isinstance(name, unicode)
        assert isinstance(regexp, re._pattern_type)
        assert isinstance(groups, listof(ScanTableGroup))
        self.name = name
    def __init__(self, tables, treatments, doc):
        assert isinstance(tables, omapof(ScanTable))
        assert len(tables) > 0
        assert isinstance(treatments, listof(ScanTreatment))
        assert isinstance(doc, unicode)

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/term.py   HTSQL(Download)
 
 
from ..util import (listof, dictof, tupleof, maybe,
                    Clonable, Printable, Hashable)
from ..domain import BooleanDomain
    def __init__(self, tag, kids, flow, baseline, routes):
        assert isinstance(tag, int)
        assert isinstance(kids, listof(Term))
        assert isinstance(flow, Flow)
        assert isinstance(baseline, Flow)
    def __init__(self, tag, lkid, rkid, joints,
                 is_left, is_right, flow, baseline, routes):
        assert isinstance(joints, listof(Joint))
        assert isinstance(is_left, bool) and isinstance(is_right, bool)
        # Note: currently we never generate right outer joins.
    def __init__(self, tag, lkid, rkid, correlations, flow, baseline, routes):
        # Verify that the right child is a correlation term and the left
        # child is its link term.
        assert isinstance(correlations, listof(Code))
        super(EmbeddingTerm, self).__init__(tag, lkid, rkid,
    def __init__(self, tag, kid, kernels, flow, baseline, routes):
        assert isinstance(kernels, listof(Code))
        super(ProjectionTerm, self).__init__(tag, kid, flow, baseline, routes)
        self.kernels = kernels
 

src/h/t/HTSQL-2.3.3/src/htsql/core/application.py   HTSQL(Download)
from .addon import addon_registry
from .adapter import ComponentRegistry
from .util import maybe, oneof, listof, dictof, tupleof
from .wsgi import wsgi
from .cmd.command import UniversalCmd
    def __init__(self, db, *extensions):
        assert isinstance(list(extensions),
                listof(oneof(str,
                             tupleof(str, maybe(dictof(str, object))),
                             dictof(str, maybe(dictof(str, object))))))

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/plan.py   HTSQL(Download)
 
 
from ..util import maybe, listof, Printable
from ..domain import Profile, Domain
 
    def __init__(self, sql, domains, substatements,
                 placeholders=None, is_single=False):
        assert isinstance(sql, unicode)
        assert isinstance(domains, listof(Domain))
        assert isinstance(substatements, listof(Statement))

src/h/t/HTSQL-2.3.3/src/htsql/core/tr/assemble.py   HTSQL(Download)
 
 
from ..util import Printable, Hashable, listof, maybe
from ..adapter import Adapter, adapt, adapt_many
from ..domain import BooleanDomain, UntypedDomain, Record, ID
    def save_subterms(self, term, subterms):
        assert isinstance(term, maybe(SegmentTerm))
        assert isinstance(subterms, listof(SegmentTerm))
        term_by_code = dict((subterm.code, subterm)
                            for subterm in subterms)
    def save_stencils(self, term, stencils):
        assert isinstance(term, SegmentTerm)
        assert isinstance(stencils, listof(listof(int))) and len(stencils) == 3
        self.stencils_by_term[term] = stencils
 

  1 | 2 | 3  Next