Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
list() -> new empty list
list(iterable) -> new list initialized from iterable's items

src/s/c/sc.social.like-2.0b1/sc/social/like/plugins/facebook/utils.py   sc.social.like(Download)
# -*- coding:utf-8 -*-
from config import FB_LOCALES
 
 
def fix_iso(code):
        # Deal with Umbrella locations (Arabic and Spanish)
        if code.startswith('es_'):
            if not code in FB_LOCALES:
                code = 'es_LA'
        elif code.startswith('ar_'):
            code = 'ar_AR'
    elif code.find('_') == -1:
        # XXX: Hack follows!
        # Try to find the best combination...
        available = [fb for fb in FB_LOCALES if fb.startswith(code)]
            # try to find a xx_XX combination if possible.
            # if not, return the first one..
            if '%s_%s' % (code.lower(), code.upper()) in FB_LOCALES:
                code = '%s_%s' % (code.lower(), code.upper())
            else:
    languages = [languages, ] if not isinstance(languages, list) else languages
    languages = [fix_iso(l) for l in languages]
    prefered = [l for l in languages if l in FB_LOCALES]
    return prefered and prefered[0] or default
 

src/s/c/sc.social.like-HEAD/sc/social/like/plugins/facebook/utils.py   sc.social.like(Download)
# -*- coding:utf-8 -*-
from config import FB_LOCALES
 
 
def fix_iso(code):
        # Deal with Umbrella locations (Arabic and Spanish)
        if code.startswith('es_'):
            if not code in FB_LOCALES:
                code = 'es_LA'
        elif code.startswith('ar_'):
            code = 'ar_AR'
    elif code.find('_') == -1:
        # XXX: Hack follows!
        # Try to find the best combination...
        available = [fb for fb in FB_LOCALES if fb.startswith(code)]
            # try to find a xx_XX combination if possible.
            # if not, return the first one..
            if '%s_%s' % (code.lower(), code.upper()) in FB_LOCALES:
                code = '%s_%s' % (code.lower(), code.upper())
            else:
    languages = [languages, ] if not isinstance(languages, list) else languages
    languages = [fix_iso(l) for l in languages]
    prefered = [l for l in languages if l in FB_LOCALES]
    return prefered and prefered[0] or default