2007年11月01日 星期四 09:03
各位大虾, 请问如何理解下面的程序语句,本人刚刚涉猎python,不明白这个语句的意思,可否给出一个逻辑关系的简单解释,非常感谢先 negative_examples_set = filter ( \lambda datapoint : datapoint not in Q[largest_usefulness_feature_id], \negative_examples_set ) 祝:开心 询楷 -- XunKai Wei IEEE Member Air Force Engineering University Xi'an, China Email:xunkai.wei at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20071101/5c5b755f/attachment.html
2007年11月01日 星期四 10:13
可参照:Dive Into Python,16.3节 内建 filter 函数,它接受两个参数:一个函数和一个列表,返回一个列表 在07-11-1,xunkai wei <xunkai.wei在gmail.com> 写道: > > 各位大虾, > > 请问如何理解下面的程序语句,本人刚刚涉猎python,不明白这个语句的意思,可否给出一个逻辑关系的简单解释,非常感谢先 > > negative_examples_set = filter ( \lambda datapoint : datapoint > not in Q[largest_usefulness_feature_id], \negative_examples_set ) > > 祝:开心 > > 询楷 > -- > XunKai Wei > IEEE Member > Air Force Engineering University > Xi'an, China > Email:xunkai.wei在gmail.com > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20071101/da6de097/attachment.htm
2007年11月01日 星期四 11:57
ÁíÍ⻹ÓоÍÊÇlambdaº¯ÊýÁË£¬ÊDz»ÊǺܷ½±ã :) On 11/1/07, yuan xuan <xuanyuan14.leo在gmail.com> wrote: > > ¿É²ÎÕÕ£ºDive Into Python£¬16.3½Ú > ÄÚ½¨ filter º¯Êý£¬Ëü½ÓÊÜÁ½¸ö²ÎÊý£ºÒ»¸öº¯ÊýºÍÒ»¸öÁÐ±í£¬·µ»ØÒ»¸öÁбí > > ÔÚ07-11-1£¬xunkai wei < xunkai.wei在gmail.com> дµÀ£º > > > > ¸÷λ´óϺ£¬ > > > > ÇëÎÊÈçºÎÀí½âÏÂÃæµÄ³ÌÐòÓï¾ä£¬±¾È˸ոÕÉæÁÔpython£¬²»Ã÷°×Õâ¸öÓï¾äµÄÒâ˼£¬¿É·ñ¸ø³öÒ»¸öÂß¼¹ØϵµÄ¼òµ¥½âÊÍ£¬·Ç³£¸ÐлÏÈ > > > > negative_examples_set = filter ( \lambda datapoint : > > datapoint not in Q[largest_usefulness_feature_id], \negative_examples_set ) > > > > ×££º¿ªÐÄ > > > > ѯ¿¬ > > -- > > XunKai Wei > > IEEE Member > > Air Force Engineering University > > Xi'an, China > > Email: xunkai.wei在gmail.com > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- Yours, fluke fluke在sfcube.net http://blog.ospattern.net -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20071101/f16c8348/attachment.htm
Zeuux © 2025
京ICP备05028076号