Unpacking Argument Lists
来源:互联网 发布:python的ide哪个好 编辑:程序博客网 时间:2024/06/06 03:12
这是Python里面比较有意思的一点:
在介绍了Arbitrary Argument Lists之后,文档里提到:
The reverse situation occurs when the arguments are already in a list or tuple but need to be unpacked for a function call requiring separate positional arguments. For instance, the built-in range() function expects separate start and stop arguments. If they are not available separately, write the function call with the *-operator to unpack the arguments out of a list or tuple:
In the same fasion, dictionaries can deliver keyword arguments with the **-operator:
还比如说用在format函数中:
- Unpacking Argument Lists
- 14.4.1 Argument lists
- variable-length argument lists
- Variable argument lists in Cocoa
- C语言中的 stdarg - variable argument lists
- Methods with Empty/One Argument Lists
- objective-c 函数的可变参数 - argument lists
- stdarg(3) variable argument lists 可变参数列表
- argument
- Joker_Italy Unpacking Tutorials
- Python--Loops,Unpacking,Lambda
- Lists
- Art Of Unpacking From Ibm
- ASProtect 2.4 SKE Manual Unpacking
- quosego [Themida/Winlicense unpacking questions]
- !EP (EXE Pack) 1.4 (Unpacking)
- Quick reference for manual unpacking
- 迭代解包(元组解包、元组拆包)Iterable Unpacking
- IFrame的显示和隐藏
- Linux安全体系的ClamAV病毒扫描程序[转]
- 预览ExtJS 4.0的新功能(六):读写器/Opeartion
- 英特尔称MeeGo将专注智能手机等四大方面应用
- 消息队列(Message Queue)简介及其使用
- Unpacking Argument Lists
- Xilinx设计元素缩写查询
- 7.c++-内存对齐的一点个人理解(#pragma pack(k))
- MeeGo系统平板电脑和智能手机明年上市
- . Net环境下消息队列(MSMQ)对象的应用
- Update 关联子查询
- Design Pattern - Builder(C#)
- Android-x86 - Porting Android to x86
- 关于WSERV 9 错误的总结!