Did I find the right examples for you? yes no

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)
Join the values in attrs, leaving out empty values.

        def joinAttrs(attrs, join_string=' '):
    """Join the values in attrs, leaving out empty values."""
    if isinstance(attrs, dict):
        attrs = attrs.values()
    return join_string.join([str(a) for a in attrs if a])
        


src/b/y/byCycleCore-0.4a0.dev-r1054/byCycle/model/entities/base.py   byCycleCore(Download)
import simplejson
 
from byCycle.util import gis, joinAttrs
from byCycle.model.db import metadata, Session
from byCycle.model.entities.util import cascade_arg
    def __str__(self):
        stuff = [
            joinAttrs(('Address Range:',
                       self.addr_f_l, ', ', self.addr_f_r,
                       'to',
                       self.addr_t_l, ', ', self.addr_t_r)),
            (self.street_name or '[No Street Name]'),
            self.place_l, self.place_r,
        ]
        return joinAttrs(stuff, join_string='\n')

src/b/y/byCycleCore-0.4a0.dev-r1054/byCycle/model/entities/public.py   byCycleCore(Download)
 
from byCycle import model_path
from byCycle.util import joinAttrs
from byCycle.model import db
from byCycle.model.entities import DeclarativeBase
            (self.suffix or '').upper()
        )
        return joinAttrs(attrs)
 
    def to_simple_object(self):
    def __str__(self):
        city_state = joinAttrs([self.city, self.state], ', ')
        return joinAttrs([city_state, str(self.zip_code or '')])
 
    def to_simple_object(self):

src/b/y/byCycleCore-0.4a0.dev-r1054/byCycle/model/address.py   byCycleCore(Download)
###############################################################################
"""Address classes."""
from byCycle.util import joinAttrs
from byCycle.model.point import Point
from byCycle.model.entities import StreetName, Place
    def __str__(self):
        result = joinAttrs([self.number, self.street_name])
        result = joinAttrs([result, self.place], '\n')
        return result
 
    def _get_street_name(self):
        return joinAttrs((self.street_name1, self.street_name2), ' & ')
    street_name = property(_get_street_name)
 
    def _get_place(self):
    def __str__(self):
        return joinAttrs((self.street_name, self.place), '\n')
 
    def to_simple_object(self):
        return {