beginning python summary chapter 6 ³éÏó
1¡¢Ê¹ÓÃdef¶¨Ò庯Êý
2¡¢º¯ÊýÎĵµ£ºÔÚº¯ÊýµÄ¿ªÍ·Ð´ÏÂ×Ö·û´®£¬Ëü¾Í»á×÷Ϊº¯ÊýµÄÒ»²¿·Ö½øÐд洢£¬³ÆΪ"Îĵµ×Ö·û´®"¡£
ÄÚ½¨µÄ½Ð×öhelpµÄº¯Êý·Ç³£ÓÐÓÃ,Èç¹ûÄãÔÚ½»»¥Ê½½âÊÍÆ÷ÖÐʹÓã¬Äã¿ÉÒԵõ½º¯ÊýÒÔ¼°ËüµÄÎĵµ×Ö·û´®µÄÐÅÏ¢£ºeg:>>>help(º¯ÊýÃû)
3¡¢PythonÄÚÓÐЩº¯Êý²¢²»·µ»ØÈκζ«Î÷£¬ÕâÀຯÊýûÓÐreturnÓï¾ä£¬»òÕßËûÃÇÓÐreturnÓï¾äµ«ÊÇÔÚºóÃæûÓÐÈκε¥´Ê
4¡¢²ÎÊý
Ïà¹ØÎĵµ£º
Ê×ÏÈ, ˵˵pythonÀïÃæµÄ±Õ°ü°É:
1. ÐèÒªº¯ÊýǶÌ×, ¾ÍÊÇÒ»¸öº¯ÊýÀïÃæÔÙдһ¸öº¯Êý.
2. Íⲿº¯ÊýÐèÒª·µ»ØÒ»¸öÄÚ²¿º¯ÊýµÄÒýÓÃ
3. Íⲿº¯ÊýÖÐÓÐһЩ¾Ö²¿±äÁ¿, ²¢ÇÒ, ÕâЩ¾Ö²¿±äÁ¿ÔÚÄÚ²¿º¯ÊýÖÐÓÐʹÓÃ
¸ÅÄî:
1. ×ÔÓɱäÁ¿: Íⲿº¯ÊýÖж¨ÒåµÄ¾Ö²¿±äÁ¿, ²¢ÇÒÔÚÄÚ²¿º¯ÊýÖб»Ê¹ÓÃ.
2. ±Õ°ü: ÄǸöʹÓÃÁË×ÔÓɱäÁ¿²¢±»·µ»ØµÄÄÚ²¿º¯Ê ......
Ian Maurer (ian@itmaurer.com), ×ÊÉî¹ËÎÊ, Brulant, Inc.
2006 Äê 7 ÔÂ 03 ÈÕ
±¾ÏµÁÐÎÄÕÂÒ»¹²ÓÐÁ½Æª£¬±¾ÎÄÊÇÆäÖеĵÚһƪ¡£ÔÚÕâһƪÎÄÕÂÖУ¬ÎÒÃǽ«Õ¹Ê¾ Django µÄÓ÷¨£¬Django ÊÇ Python ±à³ÌÓïÑÔÇý¶¯µÄÒ»¸ö¿ªÔ´Ä£ÐÍ-ÊÓͼ-¿ØÖÆÆ÷£¨MVC£©·ç¸ñµÄ Web Ó¦ÓóÌÐò¿ò¼Ü¡£Ê¹Óà Django£¬ÎÒÃÇÔÚ¼¸·ÖÖÓÖ®ÄÚ¾ ......
ÔÚStack Overflow ÉÏ¿´µ½Ñ§Ï°Python µÄÒ»¸ö·½·¨ÊÇÓÃPython ÆƽâThe Python Challenge¡£µ«ÎÒϲ»¶ÓÃRuby£¬Ë¹ÜµÃ×ÅÄØ^_^
0. ÈëÃŹغܼòµ¥¡£
p 2**38
1. ÆƽâÒ»¶Î»°£¬¹Û²ìͼƬºÜÈÝÒ×·¢ÏÖ½âÂë±í°Ñ×Öĸ±íÑ»·ÓÒÒÆÁ½Î»¡£
riddle = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl ......
½ñÍíÊÔÁËÒ»ÏÂPython×Ô´øµÄµ¥Ôª²âÊÔ£¬Ö÷ÒªÊDzο¼ÁËPythonµ¥Ôª²âÊÔ¿ò¼Ü
µÄÓйØ×ÊÁÏ£¬ÕÛÌÚÁËÒ»¸öСʱ×óÓÒ£¬×ÜËãÔÚEric 4ͨ¹ýµÄ¼¸¸ö¼òµ¥µÄµ¥Ôª²âÊÔ¡£ÔÚÕâÀォËùµÃµÄÏà¹Ø֪ʶ¼Ç¼ÏÂÀ´£¬·½±ã½«À´²éѯ¡£
python×Ô´øµÄµ¥Ôª²âÊÔÄ£¿éÊÇunittest£¬´Ó2.1ÒÔºóΪ±ê×¼¿âµÄÒ»²¿·Ö
1 ......