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

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

src/c/o/cogent-1.5.3/cogent/parse/locuslink.py   cogent(Download)
are probably a map and its corresponding link).
"""
from cogent.parse.record import MappedRecord, FieldWrapper, DelimitedSplitter,\
    list_adder, list_extender, int_setter, LineOrientedConstructor
from cogent.parse.record_finder import LabeledRecordFinder
def _pmid_adder(obj, field, line):
    """Adds pmid to relevant field"""
    list_extender(obj, field, _read_pmid(line))
 
def _assembly_adder(obj, field, line):

src/p/y/pycogent-HEAD/cogent/parse/locuslink.py   pycogent(Download)
are probably a map and its corresponding link).
"""
from cogent.parse.record import MappedRecord, FieldWrapper, DelimitedSplitter,\
    list_adder, list_extender, int_setter, LineOrientedConstructor
from cogent.parse.record_finder import LabeledRecordFinder
def _pmid_adder(obj, field, line):
    """Adds pmid to relevant field"""
    list_extender(obj, field, _read_pmid(line))
 
def _assembly_adder(obj, field, line):

src/c/o/cogent-1.5.3/tests/test_parse/test_record.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    def test_list_extender(self):
        """list_adder should add items to list, creating if necessary"""
        d = dummy()
        list_extender(d, 'x', '345')
        self.assertEqual(d.x, ['3','4','5'])
        list_extender(d, 'x', 'abc')
        self.assertEqual(d.x, ['3','4','5','a','b','c'])
        list_extender(d, 'y', [2,3])
        self.assertEqual(d.x, ['3','4','5','a','b','c'])
        self.assertEqual(d.y, [2,3])
        list_extender(d, 'y', None)
        self.assertEqual(d.y, [2,3,None])
 

src/p/y/pycogent-HEAD/tests/test_parse/test_record.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for parser support libraries dealing with records.
"""
from cogent.parse.record import FieldError, RecordError, Grouper, \
    DelimitedSplitter, GenericRecord, MappedRecord, \
    def test_list_extender(self):
        """list_adder should add items to list, creating if necessary"""
        d = dummy()
        list_extender(d, 'x', '345')
        self.assertEqual(d.x, ['3','4','5'])
        list_extender(d, 'x', 'abc')
        self.assertEqual(d.x, ['3','4','5','a','b','c'])
        list_extender(d, 'y', [2,3])
        self.assertEqual(d.x, ['3','4','5','a','b','c'])
        self.assertEqual(d.y, [2,3])
        list_extender(d, 'y', None)
        self.assertEqual(d.y, [2,3,None])