Did I find the right examples for you? yes no

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/struct/rna2d.py   cogent(Download)
from cogent.util.transform import make_trans, float_from_string
from cogent.core.tree import TreeNode, TreeError
from cogent.util.misc import not_none, flatten
 
__author__ = "Rob Knight"

src/p/y/pycogent-HEAD/cogent/struct/rna2d.py   pycogent(Download)
from cogent.util.transform import make_trans, float_from_string
from cogent.core.tree import TreeNode, TreeError
from cogent.util.misc import not_none, flatten
 
__author__ = "Rob Knight"

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_not_none(self):
        """not_none should return True if none of the items is None"""
        assert not_none([1,2,3,4])
        assert not not_none([1,2,3,None])
        self.assertEqual(filter(not_none,[(1,2),(3,None)]),[(1,2)])

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_not_none(self):
        """not_none should return True if none of the items is None"""
        assert not_none([1,2,3,4])
        assert not not_none([1,2,3,None])
        self.assertEqual(filter(not_none,[(1,2),(3,None)]),[(1,2)])