Did I find the right examples for you? yes no

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/core/moltype.py   cogent(Download)
from cogent.core.alphabet import CharAlphabet, Enumeration, Alphabet, \
    AlphabetError, _make_complement_array
from cogent.util.misc import FunctionWrapper, add_lowercase, iterable, if_
from cogent.util.transform import allchars, keep_chars
from cogent.data.molecular_weight import DnaMW, RnaMW, ProteinMW
            if isinstance(curr, Alphabet):
                curr = tuple(curr)
            new = add_lowercase(curr)
            setattr(self, name, new)
 

src/p/y/pycogent-HEAD/cogent/core/moltype.py   pycogent(Download)
from cogent.core.alphabet import CharAlphabet, Enumeration, Alphabet, \
    AlphabetError, _make_complement_array
from cogent.util.misc import FunctionWrapper, add_lowercase, iterable, if_
from cogent.util.transform import allchars, keep_chars
from cogent.data.molecular_weight import DnaMW, RnaMW, ProteinMW
            if isinstance(curr, Alphabet):
                curr = tuple(curr)
            new = add_lowercase(curr)
            setattr(self, name, new)
 

src/c/o/cogent-1.5.3/tests/test_util/test_misc.py   cogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
    def test_add_lowercase(self):
        """add_lowercase should add lowercase version of each key w/ same val"""
        d = {'a':1, 'b':'test', 'A':5, 'C':123, 'D':[], 'AbC':'XyZ', \
            None:'3', '$':'abc', 145:'5'}
        add_lowercase(d)
    def test_add_lowercase_tuple(self):
        """add_lowercase should deal with tuples correctly"""
        d = {('A','B'):'C', ('D','e'):'F', ('b','c'):'H'}
        add_lowercase(d)
        self.assertEqual(d, {

src/p/y/pycogent-HEAD/tests/test_util/test_misc.py   pycogent(Download)
from cogent.app.util import get_tmp_filename
from cogent.util.unit_test import TestCase, main
from cogent.util.misc import (iterable, max_index, min_index,
    flatten, is_iterable, is_char, is_char_or_noniterable,
    is_str_or_noniterable, not_list_tuple, list_flatten,
    def test_add_lowercase(self):
        """add_lowercase should add lowercase version of each key w/ same val"""
        d = {'a':1, 'b':'test', 'A':5, 'C':123, 'D':[], 'AbC':'XyZ', \
            None:'3', '$':'abc', 145:'5'}
        add_lowercase(d)
    def test_add_lowercase_tuple(self):
        """add_lowercase should deal with tuples correctly"""
        d = {('A','B'):'C', ('D','e'):'F', ('b','c'):'H'}
        add_lowercase(d)
        self.assertEqual(d, {