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

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)
tuple() -> empty tuple
tuple(iterable) -> tuple initialized from iterable's items

If the argument is a tuple, the return value is the same object.

src/a/s/astoptimizer-0.6/astoptimizer/optimizer.py   astoptimizer(Download)
    clone_node_list, is_empty_body)
from astoptimizer.config import optimize_unicode
from astoptimizer.compatibility import (
    u,
    PYTHON2, PYTHON27, PYTHON3, PYTHON33, PYTHON34,
    def visit_Subscript(self, node):
        value = node.value
        value_constant = self.get_constant(value, IMMUTABLE_ITERABLE_TYPES)
        if value_constant is UNSET:
            return
    def try_unroll_loop(self, node):
        if self.config.unroll_limit <= 0:
            return UNSET
 
        itercst = self.get_constant(node.iter, IMMUTABLE_ITERABLE_TYPES,
            return
 
        itercst = self.get_constant(generator.iter, IMMUTABLE_ITERABLE_TYPES,
                                    max_length=self.config.unroll_limit)
        if itercst is UNSET:

src/a/s/astoptimizer-0.6/astoptimizer/config_builtin_funcs.py   astoptimizer(Download)
"""
Enable optimizations on the builtins functions, example: len().
"""
from astoptimizer.compatibility import (
    is_bytes_ascii, is_unicode_ascii,
    config.add_func('float', Function(float, 1, FLOAT_TYPES + STR_TYPES, catch=ValueError))
    config.add_func('int', Function(int, 1, FLOAT_TYPES + STR_TYPES, catch=ValueError))
    config.add_func('len', Function(len, 1, IMMUTABLE_ITERABLE_TYPES, check_result=check_len))
    config.add_func('oct', Function(oct, 1, INT_TYPES))
    config.add_func('ord', Function(ord, 1, STR_TYPES, check_args=check_ord_args))

src/a/s/astoptimizer-0.6/astoptimizer/config_builtin_types.py   astoptimizer(Download)
"""
Enable optimizations on the builtins types, example: unicode.encode().
"""
 
from astoptimizer.compatibility import (
        'isdisjoint', 'issubset', 'issuperset',
    ):
        config.add_method(Method(frozenset, method, 1, IMMUTABLE_ITERABLE_TYPES))
 
    # int