2005年07月08日 星期五 20:21
用list传递参数也行嘛 想在list里面放几个就放几个 ======= 2005-07-08 17:33:00 您在来信中写道:======= >必输参数不能省,不定参数前面加*,如: >func(a, *args) >这样可以使用 >func(a) >func(a, b) >func(a, b, c) >... >进行调用 > >在 05-7-8,guqi<guqi at oasisnet.com.cn> 写道: >> >> 例如: >> 定义时func(a,b,c) >> >> 调用时func(a)或func(a,b)呢. >> _______________________________________________ >> python-chinese list >> python-chinese at lists.python.cn >> http://python.cn/mailman/listinfo/python-chinese >> >> >> > > >-- >I like python! >My Donews Blog: http://www.donews.net/limodou >New Google Maillist: http://groups-beta.google.com/group/python-cn >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese > = = = = = = = = = = = = = = = = = = = = 致 礼! amingsc amingsc at 163.com 2005-07-08
Zeuux © 2025
京ICP备05028076号