Did I find the right examples for you? yes no

All Samples(9)  |  Call(5)  |  Derive(0)  |  Import(4)
Returns whether x is a sequence (tuple, list).

:param x: a value to check
:returns: (boolean)

        def is_sequence(x):
    """ Returns whether x is a sequence (tuple, list).

    :param x: a value to check
    :returns: (boolean)

    """
    return (not hasattr(x, 'strip') and
            hasattr(x, '__getitem__') or
            hasattr(x, '__iter__'))
        


src/j/s/jsonmanager-0.1.0.3/jsonmanager/coercion_tools.py   jsonmanager(Download)
    ListOf
    )
from .util import (
    is_mapping,
    is_sequence,
def _coerce_list(manager, schema, data, routine):
    """ Coerce a list.
        Coerce each value from `data` with the corresponding `schema` value.
        Extra elements from `data` are returned unchanged. """
    if not is_sequence(data):
def _coerce_ListOf(manager, list_of, data, routine):
    """ Coerce a list with arbitrary length.
        Coerce each value from `data` with `list_of.schema`. """
    if not is_sequence(data):
        return data

src/j/s/jsonmanager-0.1.0.3/jsonmanager/validation_tools.py   jsonmanager(Download)
    ListOf
    )
from .util import (
    is_mapping,
    is_sequence,
def _confirm_sequence_type(data):
    """ Raise `ValidationError` if `data` is not a sequence, or if `data` is a
        string. """
    if not is_sequence(data):
        raise ValidationError('TYPE', "Not a sequence.")

src/a/p/appdotnet-0.1.3/appdotnet/api.py   appdotnet(Download)
import dateutil
from exceptions import APIException, HTTPException
from util import is_sequence
 
USER_AGENT = 'appdotnet/0.1.3 (Python/%s)' % '.'.join([str(x) for x in
    if collapse:
        for key in params:
            if is_sequence(params[key]):
                params[key] = ','.join(params[key])
 

src/a/p/appdotnet-HEAD/appdotnet/api.py   appdotnet(Download)
import dateutil
from exceptions import APIException, HTTPException
from util import is_sequence
 
USER_AGENT = 'appdotnet/0.1.3 (Python/%s)' % '.'.join([str(x) for x in
    if collapse:
        for key in params:
            if is_sequence(params[key]):
                params[key] = ','.join(params[key])