python的map(function , iterator) VS arduino的map()
2017-07-12 11:12
441 查看
Python : map(function, iterable, ...)
Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments
and is applied to the items from all iterables in parallel. If one iterable is shorter than another it is assumed to be extended withNoneitems. If function isNone, the identity function is assumed;
if there are multiple arguments, map() returns a list consisting of tuples containing the corresponding items from all iterables (a kind of transpose operation). The iterable arguments
may be a sequence or any iterable object; the result is always a list.
1、对可迭代函数'iterable'中的每一个元素应用‘function’方法,将结果作为list返回。
2、如果给出了额外的可迭代参数,则对每个可迭代参数中的元素‘并行’的应用‘function’。(翻译的不好,这里的关键是‘并行’)
3、如果'function'给出的是‘None’,自动假定一个‘identity’函数
Arduino
Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments
and is applied to the items from all iterables in parallel. If one iterable is shorter than another it is assumed to be extended withNoneitems. If function isNone, the identity function is assumed;
if there are multiple arguments, map() returns a list consisting of tuples containing the corresponding items from all iterables (a kind of transpose operation). The iterable arguments
may be a sequence or any iterable object; the result is always a list.
1、对可迭代函数'iterable'中的每一个元素应用‘function’方法,将结果作为list返回。
2、如果给出了额外的可迭代参数,则对每个可迭代参数中的元素‘并行’的应用‘function’。(翻译的不好,这里的关键是‘并行’)
3、如果'function'给出的是‘None’,自动假定一个‘identity’函数
Arduino
map(value, fromLow, fromHigh, toLow, toHigh)
相关文章推荐
- Python标准库:内置函数map(function, iterable, ...)
- Python map/reduce vs 列表推导式[list comprehension]
- function返回值Python特殊语法:filter、map、reduce、lambda
- 【Python】迭代器(iterator) vs 生成器(generator)
- The study of map() and reduce() function in Python(20170913)
- 在VS13上编译通过的代码放在12上编译-错误:l __dtoui3 referenced in function _event_debug_map_HT_GROW
- Python标准库:内置函数map(function, iterable, ...)
- Python 内建函数 - map(function, iterable, ...)
- python技巧——list comprehension vs map
- 【Python】 for, list_comprehension, map_function, generator_expression效率比较
- Python中的map(function,iterable, ...)方法
- 飘逸的python - Iterable vs Iterator
- Multi-thread VS function call
- Wonderful String Translation Function in Python / Python神奇的字符串变换函数
- 用Iterator遍历Map
- Python 学习笔记 - 9.函数(Function)
- 理解 python 的 method 和 function 兼谈 descriptor
- Python function calls from the bash shell or dos prompt
- Python 过滤字符串的技巧,map与itertools.imap
- ocx function and the order of BEGIN_DISPATCH_MAP