<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>砼砼&#039;s blog</title>
	<atom:link href="http://tossp.com/feed" rel="self" type="application/rss+xml" />
	<link>http://tossp.com</link>
	<description>砼&#60;-这个字读tong，男人是泥做的，女人是水做的，我是混凝土做的。</description>
	<lastBuildDate>Sun, 18 Jul 2010 18:57:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://tossp.com/?pushpress=hub'/>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://tossp.com/wp-includes/js/jquery/jquery.js?ver=1.4.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>黑莓：推荐BlackBerry 8820的应用(未完待续)</title>
		<link>http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html</link>
		<comments>http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html#comments</comments>
		<pubDate>Sun, 18 Jul 2010 18:57:36 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[杂货铺]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2151</guid>
		<description><![CDATA[全是我正在使用的东西，有付费的，有免费的
我用的功能，不多只是几个简单的东西，对于QQ，MSN之类的我更习惯wap网页模式
也不会想着在BB上玩游戏，一般也就看看电子书
我在使用的
<div class="clear"></div><a href="http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html" title="黑莓：推荐BlackBerry 8820的应用(未完待续)" rel="external" class="more-link">阅读全文-—共711字</a>]]></description>
			<content:encoded><![CDATA[<p>全是我正在使用的东西，有付费的，有免费的</p>
<p>我用的功能，不多只是几个简单的东西，对于QQ，MSN之类的我更习惯wap网页模式</p>
<p>也不会想着在BB上玩游戏，一般也就看看电子书</p>
<h1>我在使用的</h1>
<h2><a href="http://www.021systems.com/download/021/SmartMail-v1.05.0621.zip">SmartMail（付费）</a></h2>
<p>这是一个收发E-Mail的应用。</p>
<p><script language="javascript">BuildPlayer('swf','http://player.youku.com/player.php/sid/XMTY5MDg3NTcy/v.swf','400','300');</script></p>
<p>亮点：</p>
<ol>
<li>通过浏览器阅览纯HTML的邮件，使得纯HTML邮件不再是纯文字版本而显得苍白，将纯HTML邮件封装成附件，直接通过浏览器打开；</li>
<li>不改变你的电子邮件地址，只要你的电子邮件服务器支持POP3和STMP协议就可以使用，我设置的是5分钟接收一次邮件；</li>
<li>利用BB的Message模块，操作方式上同SMS甚至是RIM的push  mail一致；</li>
<li>支持多邮箱配置，发送和收取可以进行选择性开启与关闭；</li>
<li>支持CMWAP/CMNET/BESBIS/WIFI四种接入点，可以按照需求进行更改；</li>
<li>可以查看收发邮件的数据量与邮件数，通过状态数据可以了解发送邮件的GPRS流量情况。</li>
</ol>
<p>缺点：</p>
<ol>
<li>免费版加入了发送邮件尾巴”Send via SmartMail for BlackBerry.”与收到邮件后的一些追加内容，注册版用户不受影响；</li>
<li>首次安装的时候需要导入特制的ServiceBook；</li>
</ol>
<p>我这里还有一个打折的序列号，需要购买的话可以联系我哦。</p>
<p><a title="SmartMailOTA地址" href="http://ota.bbercn.com/2010/smartmail/OTA/SmartMail.jad">猛点击</a>（远程OTA下载）</p>
<h2>Opera Mini</h2>
<h2>Google Maps</h2>
<h2>Google Sync</h2>
<h2>Documents To Go</h2>
<h2>Anyview</h2>
<h2>AddOnIs（付费）</h2>
<h2>黑莓来电助手</h2>
<h2>KeyMaster</h2>
<h1>我感兴趣的</h1>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html#comments" title="to the comments">已有2条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;t=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29&amp;body=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;title=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;bm_description=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29&uri=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&amp;title=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29%20-%20http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&title=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fblackberry-blackberry-8820-recommended-the-application-to-be-continued.html&title=%E9%BB%91%E8%8E%93%EF%BC%9A%E6%8E%A8%E8%8D%90BlackBerry%208820%E7%9A%84%E5%BA%94%E7%94%A8%28%E6%9C%AA%E5%AE%8C%E5%BE%85%E7%BB%AD%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/blackberry-blackberry-8820-recommended-the-application-to-be-continued.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>六月的光</title>
		<link>http://tossp.com/june-light.html</link>
		<comments>http://tossp.com/june-light.html#comments</comments>
		<pubDate>Thu, 01 Jul 2010 15:15:54 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[偶滴生活]]></category>
		<category><![CDATA[轨迹]]></category>
		<category><![CDATA[日记]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2146</guid>
		<description><![CDATA[这又是一篇月经+蛋疼的日志
其实，蛋疼的不是我，而是他们，平时闲的蛋疼，总喜欢在周五给你一大堆破事儿，MD你当是在发家庭作业啊？
=============================
以上部分来自六月的某个时候，这次回来之前，去了洪荒之地，尝试了披荆斩棘，感受了烈日当头，经历了风摧雨打
<div class="clear"></div><a href="http://tossp.com/june-light.html" title="六月的光" rel="external" class="more-link">阅读全文-—共341字</a>]]></description>
			<content:encoded><![CDATA[<p>这又是一篇月经+蛋疼的日志</p>
<p>其实，蛋疼的不是我，而是他们，平时闲的蛋疼，总喜欢在周五给你一大堆破事儿，MD你当是在发家庭作业啊？<br />
=============================<br />
以上部分来自六月的某个时候，这次回来之前，去了洪荒之地，尝试了披荆斩棘，感受了烈日当头，经历了风摧雨打</p>
<p>最后，哥感冒了。。。</p>
<p>不过，哥的感冒不是烈日惹的祸，也不是风雨降的灾，是给那该死的空调吹的</p>
<p>感觉一下子，就老了，闲的时候，就想玩玩游戏，不再像以前一样，东折腾，西折腾的了</p>
<p>估计是我软绵绵的样子，没点儿精气神儿，树森大叔也懒的搭理我了</p>
<p>有很多事要做，但是去洪荒这几天，办公室的事儿就积了一大堆了，</p>
<p>偏偏我又啥都不想做，纠结啊，，，那些东西天天死命的催，惆怅啊</p>
<p>没有了希望和激情，就只有浑浑噩噩了吧</p>
<p>困了，不想写了</p>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/june-light.html#comments" title="to the comments">已有9条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/june-light.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;bodytext=%E8%BF%99%E5%8F%88%E6%98%AF%E4%B8%80%E7%AF%87%E6%9C%88%E7%BB%8F%2B%E8%9B%8B%E7%96%BC%E7%9A%84%E6%97%A5%E5%BF%97%0D%0A%0D%0A%E5%85%B6%E5%AE%9E%EF%BC%8C%E8%9B%8B%E7%96%BC%E7%9A%84%E4%B8%8D%E6%98%AF%E6%88%91%EF%BC%8C%E8%80%8C%E6%98%AF%E4%BB%96%E4%BB%AC%EF%BC%8C%E5%B9%B3%E6%97%B6%E9%97%B2%E7%9A%84%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%80%BB%E5%96%9C%E6%AC%A2%E5%9C%A8%E5%91%A8%E4%BA%94%E7%BB%99%E4%BD%A0%E4%B8%80%E5%A4%A7%E5%A0%86%E7%A0%B4%E4%BA%8B%E5%84%BF%EF%BC%8CMD%E4%BD%A0%E5%BD%93%E6%98%AF%E5%9C%A8%E5%8F%91%E5%AE%B6%E5%BA%AD%E4%BD%9C%E4%B8%9A%E5%95%8A%EF%BC%9F%0D%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0D%0A%E4%BB%A5%E4%B8%8A%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E5%85%AD%E6%9C%88%E7%9A%84%E6%9F%90" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fjune-light.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;notes=%E8%BF%99%E5%8F%88%E6%98%AF%E4%B8%80%E7%AF%87%E6%9C%88%E7%BB%8F%2B%E8%9B%8B%E7%96%BC%E7%9A%84%E6%97%A5%E5%BF%97%0D%0A%0D%0A%E5%85%B6%E5%AE%9E%EF%BC%8C%E8%9B%8B%E7%96%BC%E7%9A%84%E4%B8%8D%E6%98%AF%E6%88%91%EF%BC%8C%E8%80%8C%E6%98%AF%E4%BB%96%E4%BB%AC%EF%BC%8C%E5%B9%B3%E6%97%B6%E9%97%B2%E7%9A%84%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%80%BB%E5%96%9C%E6%AC%A2%E5%9C%A8%E5%91%A8%E4%BA%94%E7%BB%99%E4%BD%A0%E4%B8%80%E5%A4%A7%E5%A0%86%E7%A0%B4%E4%BA%8B%E5%84%BF%EF%BC%8CMD%E4%BD%A0%E5%BD%93%E6%98%AF%E5%9C%A8%E5%8F%91%E5%AE%B6%E5%BA%AD%E4%BD%9C%E4%B8%9A%E5%95%8A%EF%BC%9F%0D%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0D%0A%E4%BB%A5%E4%B8%8A%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E5%85%AD%E6%9C%88%E7%9A%84%E6%9F%90" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;t=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;annotation=%E8%BF%99%E5%8F%88%E6%98%AF%E4%B8%80%E7%AF%87%E6%9C%88%E7%BB%8F%2B%E8%9B%8B%E7%96%BC%E7%9A%84%E6%97%A5%E5%BF%97%0D%0A%0D%0A%E5%85%B6%E5%AE%9E%EF%BC%8C%E8%9B%8B%E7%96%BC%E7%9A%84%E4%B8%8D%E6%98%AF%E6%88%91%EF%BC%8C%E8%80%8C%E6%98%AF%E4%BB%96%E4%BB%AC%EF%BC%8C%E5%B9%B3%E6%97%B6%E9%97%B2%E7%9A%84%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%80%BB%E5%96%9C%E6%AC%A2%E5%9C%A8%E5%91%A8%E4%BA%94%E7%BB%99%E4%BD%A0%E4%B8%80%E5%A4%A7%E5%A0%86%E7%A0%B4%E4%BA%8B%E5%84%BF%EF%BC%8CMD%E4%BD%A0%E5%BD%93%E6%98%AF%E5%9C%A8%E5%8F%91%E5%AE%B6%E5%BA%AD%E4%BD%9C%E4%B8%9A%E5%95%8A%EF%BC%9F%0D%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0D%0A%E4%BB%A5%E4%B8%8A%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E5%85%AD%E6%9C%88%E7%9A%84%E6%9F%90" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;body=http%3A%2F%2Ftossp.com%2Fjune-light.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;bm_description=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&amp;body=%E8%BF%99%E5%8F%88%E6%98%AF%E4%B8%80%E7%AF%87%E6%9C%88%E7%BB%8F%2B%E8%9B%8B%E7%96%BC%E7%9A%84%E6%97%A5%E5%BF%97%0D%0A%0D%0A%E5%85%B6%E5%AE%9E%EF%BC%8C%E8%9B%8B%E7%96%BC%E7%9A%84%E4%B8%8D%E6%98%AF%E6%88%91%EF%BC%8C%E8%80%8C%E6%98%AF%E4%BB%96%E4%BB%AC%EF%BC%8C%E5%B9%B3%E6%97%B6%E9%97%B2%E7%9A%84%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%80%BB%E5%96%9C%E6%AC%A2%E5%9C%A8%E5%91%A8%E4%BA%94%E7%BB%99%E4%BD%A0%E4%B8%80%E5%A4%A7%E5%A0%86%E7%A0%B4%E4%BA%8B%E5%84%BF%EF%BC%8CMD%E4%BD%A0%E5%BD%93%E6%98%AF%E5%9C%A8%E5%8F%91%E5%AE%B6%E5%BA%AD%E4%BD%9C%E4%B8%9A%E5%95%8A%EF%BC%9F%0D%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0D%0A%E4%BB%A5%E4%B8%8A%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E5%85%AD%E6%9C%88%E7%9A%84%E6%9F%90" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&uri=http%3A%2F%2Ftossp.com%2Fjune-light.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&amp;title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89%20-%20http%3A%2F%2Ftossp.com%2Fjune-light.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fjune-light.html&title=%E5%85%AD%E6%9C%88%E7%9A%84%E5%85%89&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/june-light.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WP:额，换域名了～</title>
		<link>http://tossp.com/wp-volume-change-the-domain-of-the.html</link>
		<comments>http://tossp.com/wp-volume-change-the-domain-of-the.html#comments</comments>
		<pubDate>Tue, 22 Jun 2010 10:25:53 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[轨迹]]></category>
		<category><![CDATA[部落格]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2147</guid>
		<description><![CDATA[不得不承认，我经常蛋疼，昨晚又疼了一次，一个不小心把域名给换了。。。
换域名的主要理由是，国内好多网站，包括联想（lenovo）在内，都无法识别我的域名邮箱（im-t.net）。
刚好想到一个单词toss，就把域名给换了。
谷歌大叔告诉我toss pig 的意思是抛猪，pig toss 的意思是猪折腾。。。囧
<div class="clear"></div><a href="http://tossp.com/wp-volume-change-the-domain-of-the.html" title="WP:额，换域名了～" rel="external" class="more-link">阅读全文-—共1671字</a>]]></description>
			<content:encoded><![CDATA[<p>不得不承认，我经常蛋疼，昨晚又疼了一次，一个不小心把域名给换了。。。</p>
<p>换域名的主要理由是，国内好多网站，包括联想（lenovo）在内，都无法识别我的域名邮箱（im-t.net）。</p>
<p>刚好想到一个单词toss，就把域名给换了。</p>
<p>谷歌大叔告诉我toss pig 的意思是抛猪，pig toss 的意思是猪折腾。。。囧</p>
<p>一番权衡（抛硬币）后，最终选定了这个tossp.com，咱也不是什么文学青年就不讨论是含义的了，</p>
<p>换域名以后免不鸟要修改数据库，恰好，哥每次都忘记要修改些什么东西。。。。</p>
<p>最后，不得已慢慢检查数据库的资料，</p>
<h2>数据库更新</h2>
<p>进入phpadmin，输入以下SQL命令，表名根据自己的实际情况修改。</p>
<div class="codecolorer-container sql blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://im-t.net'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://tossp.com'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'home'</span> <span style="color: #993333; font-weight: bold;">OR</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'siteurl'</span>;<br />
<span style="color: #808080; font-style: italic;">--修改blog的url路径</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> &nbsp;<span style="color: #ff0000;">'http://im-t.net'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://tossp.com'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">--替换已发布文章中的链接</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://im-t.net'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://tossp.com'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">--修改固定链接</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_users <span style="color: #993333; font-weight: bold;">SET</span> user_url <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'http://tossp.com'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> ID<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_users <span style="color: #993333; font-weight: bold;">SET</span> user_email <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'电子邮件'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> ID<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #808080; font-style: italic;">--修改管理员的资料（网站和邮箱）</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_comments <span style="color: #993333; font-weight: bold;">SET</span> comment_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>comment_content<span style="color: #66cc66;">,</span><span style="color: #ff0000;">'http://im-t.net'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://tossp.com'</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">--替换评论里面的网址</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_comments <span style="color: #993333; font-weight: bold;">SET</span> comment_author_email <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'电子邮件'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> user_id<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_comments <span style="color: #993333; font-weight: bold;">SET</span> comment_author_url <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'http://tossp.com/'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> user_id<span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #808080; font-style: italic;">--修改评论者的网站和邮箱，user_id= 1一般是指admin这个对应wp_users表里面的ID字段</span><br />
<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_comments <span style="color: #993333; font-weight: bold;">SET</span> user_id <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">WHERE</span> comment_author<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'冰淼·十二少'</span>;<br />
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_comments <span style="color: #993333; font-weight: bold;">SET</span> comment_author <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'砼砼'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> comment_author<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'冰淼·十二少'</span>;<br />
<span style="color: #808080; font-style: italic;">--这个是由于我的历史原因，要修改的。。。就不细说了</span></div></div>
<p>嗯嗯，数据库的更新就是这样的了，你也可以根据自己的情况，写一些语句</p>
<h2>域名301跳转</h2>
<p>换域名以后的第二件事儿就是跳转保，同样的修改<code class="codecolorer text default"><span class="text">.htaccess</span></code>文件实现</p>
<p>添加了这样的两行代码</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_HOST<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">!</span>^tossp.com$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>$ http:<span style="color: #000000; font-weight: bold;">//</span>tossp.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>L,<span style="color: #007800;">R</span>=<span style="color: #000000;">301</span><span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>修改以后就是，这个样子的</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"> <span style="color: #666666; font-style: italic;"># BEGIN WordPress</span><br />
RewriteEngine On<br />
RewriteBase <span style="color: #000000; font-weight: bold;">/</span><br />
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>HTTP_HOST<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">!</span>^tossp.com$ <span style="color: #7a0874; font-weight: bold;">&#91;</span>NC<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>$ http:<span style="color: #000000; font-weight: bold;">//</span>tossp.com<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>L,<span style="color: #007800;">R</span>=<span style="color: #000000;">301</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>REQUEST_FILENAME<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">!</span>-f<br />
RewriteCond <span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>REQUEST_FILENAME<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #000000; font-weight: bold;">!</span>-d<br />
RewriteRule . <span style="color: #000000; font-weight: bold;">/</span>index.php <span style="color: #7a0874; font-weight: bold;">&#91;</span>L<span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #666666; font-style: italic;"># END WordPress</span></div></div>
<p>含义就是，只要不是用http://tossp.com/访问的，全部301转向到http://tossp.com/。嘿嘿</p>
<p>至于其中的利弊自个儿权衡了～</p>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/wp-volume-change-the-domain-of-the.html#comments" title="to the comments">已有7条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/wp-volume-change-the-domain-of-the.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;bodytext=%E4%B8%8D%E5%BE%97%E4%B8%8D%E6%89%BF%E8%AE%A4%EF%BC%8C%E6%88%91%E7%BB%8F%E5%B8%B8%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%98%A8%E6%99%9A%E5%8F%88%E7%96%BC%E4%BA%86%E4%B8%80%E6%AC%A1%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%B0%8F%E5%BF%83%E6%8A%8A%E5%9F%9F%E5%90%8D%E7%BB%99%E6%8D%A2%E4%BA%86%E3%80%82%E3%80%82%E3%80%82%0D%0A%0D%0A%E6%8D%A2%E5%9F%9F%E5%90%8D%E7%9A%84%E4%B8%BB%E8%A6%81%E7%90%86%E7%94%B1%E6%98%AF%EF%BC%8C%E5%9B%BD%E5%86%85%E5%A5%BD%E5%A4%9A%E7%BD%91%E7%AB%99%EF%BC%8C%E5%8C%85%E6%8B%AC%E8%81%94%E6%83%B3%EF%BC%88lenovo%EF%BC%89%E5%9C%A8%E5%86%85%EF%BC%8C%E9%83%BD%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E6%88%91%E7%9A%84%E5%9F%9F%E5%90%8D%E9%82%AE%E7%AE%B1%EF%BC%88im-t.net%EF%BC%89%E3%80%82%0D%0A%0D%0A%E5%88%9A%E5%A5%BD" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;notes=%E4%B8%8D%E5%BE%97%E4%B8%8D%E6%89%BF%E8%AE%A4%EF%BC%8C%E6%88%91%E7%BB%8F%E5%B8%B8%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%98%A8%E6%99%9A%E5%8F%88%E7%96%BC%E4%BA%86%E4%B8%80%E6%AC%A1%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%B0%8F%E5%BF%83%E6%8A%8A%E5%9F%9F%E5%90%8D%E7%BB%99%E6%8D%A2%E4%BA%86%E3%80%82%E3%80%82%E3%80%82%0D%0A%0D%0A%E6%8D%A2%E5%9F%9F%E5%90%8D%E7%9A%84%E4%B8%BB%E8%A6%81%E7%90%86%E7%94%B1%E6%98%AF%EF%BC%8C%E5%9B%BD%E5%86%85%E5%A5%BD%E5%A4%9A%E7%BD%91%E7%AB%99%EF%BC%8C%E5%8C%85%E6%8B%AC%E8%81%94%E6%83%B3%EF%BC%88lenovo%EF%BC%89%E5%9C%A8%E5%86%85%EF%BC%8C%E9%83%BD%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E6%88%91%E7%9A%84%E5%9F%9F%E5%90%8D%E9%82%AE%E7%AE%B1%EF%BC%88im-t.net%EF%BC%89%E3%80%82%0D%0A%0D%0A%E5%88%9A%E5%A5%BD" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;t=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;annotation=%E4%B8%8D%E5%BE%97%E4%B8%8D%E6%89%BF%E8%AE%A4%EF%BC%8C%E6%88%91%E7%BB%8F%E5%B8%B8%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%98%A8%E6%99%9A%E5%8F%88%E7%96%BC%E4%BA%86%E4%B8%80%E6%AC%A1%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%B0%8F%E5%BF%83%E6%8A%8A%E5%9F%9F%E5%90%8D%E7%BB%99%E6%8D%A2%E4%BA%86%E3%80%82%E3%80%82%E3%80%82%0D%0A%0D%0A%E6%8D%A2%E5%9F%9F%E5%90%8D%E7%9A%84%E4%B8%BB%E8%A6%81%E7%90%86%E7%94%B1%E6%98%AF%EF%BC%8C%E5%9B%BD%E5%86%85%E5%A5%BD%E5%A4%9A%E7%BD%91%E7%AB%99%EF%BC%8C%E5%8C%85%E6%8B%AC%E8%81%94%E6%83%B3%EF%BC%88lenovo%EF%BC%89%E5%9C%A8%E5%86%85%EF%BC%8C%E9%83%BD%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E6%88%91%E7%9A%84%E5%9F%9F%E5%90%8D%E9%82%AE%E7%AE%B1%EF%BC%88im-t.net%EF%BC%89%E3%80%82%0D%0A%0D%0A%E5%88%9A%E5%A5%BD" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;body=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;bm_description=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&amp;body=%E4%B8%8D%E5%BE%97%E4%B8%8D%E6%89%BF%E8%AE%A4%EF%BC%8C%E6%88%91%E7%BB%8F%E5%B8%B8%E8%9B%8B%E7%96%BC%EF%BC%8C%E6%98%A8%E6%99%9A%E5%8F%88%E7%96%BC%E4%BA%86%E4%B8%80%E6%AC%A1%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%B0%8F%E5%BF%83%E6%8A%8A%E5%9F%9F%E5%90%8D%E7%BB%99%E6%8D%A2%E4%BA%86%E3%80%82%E3%80%82%E3%80%82%0D%0A%0D%0A%E6%8D%A2%E5%9F%9F%E5%90%8D%E7%9A%84%E4%B8%BB%E8%A6%81%E7%90%86%E7%94%B1%E6%98%AF%EF%BC%8C%E5%9B%BD%E5%86%85%E5%A5%BD%E5%A4%9A%E7%BD%91%E7%AB%99%EF%BC%8C%E5%8C%85%E6%8B%AC%E8%81%94%E6%83%B3%EF%BC%88lenovo%EF%BC%89%E5%9C%A8%E5%86%85%EF%BC%8C%E9%83%BD%E6%97%A0%E6%B3%95%E8%AF%86%E5%88%AB%E6%88%91%E7%9A%84%E5%9F%9F%E5%90%8D%E9%82%AE%E7%AE%B1%EF%BC%88im-t.net%EF%BC%89%E3%80%82%0D%0A%0D%0A%E5%88%9A%E5%A5%BD" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&uri=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&amp;title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E%20-%20http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fwp-volume-change-the-domain-of-the.html&title=WP%3A%E9%A2%9D%EF%BC%8C%E6%8D%A2%E5%9F%9F%E5%90%8D%E4%BA%86%EF%BD%9E&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/wp-volume-change-the-domain-of-the.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>BOOT:使用gfxmenu制作帅气的引导界面(未完成版)</title>
		<link>http://tossp.com/boot-use-gfxmenu-make-handsome-guide-interface.html</link>
		<comments>http://tossp.com/boot-use-gfxmenu-make-handsome-guide-interface.html#comments</comments>
		<pubDate>Mon, 21 Jun 2010 06:17:32 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[gfxmenu]]></category>
		<category><![CDATA[grub4dos]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2144</guid>
		<description><![CDATA[首先感谢bean大师的辛勤工作。
很久以前写了一篇引导:关于gfxmenu的备忘今天再看，发现忘记的差不多
在这里重新整理一下。制作U盘的引导的方法不是这里的重点，我就不提了。
如果你想了解怎么制作U盘的引导和不重启计算的测试引导方法猛点这里。
<div class="clear"></div><a href="http://tossp.com/boot-use-gfxmenu-make-handsome-guide-interface.html" title="BOOT:使用gfxmenu制作帅气的引导界面(未完成版)" rel="external" class="more-link">阅读全文-—共1472字</a>]]></description>
			<content:encoded><![CDATA[<p>首先感谢bean大师的辛勤工作。</p>
<p>很久以前写了一篇<a title="引导:关于gfxmenu的备忘" rel="bookmark" href="http://tossp.com/guide-about-the-gfxmenu-memo.html">引导:关于gfxmenu的备忘</a>今天再看，发现忘记的差不多</p>
<p>在这里重新整理一下。制作U盘的引导的方法不是这里的重点，我就不提了。</p>
<p>如果你想了解怎么制作U盘的引导和不重启计算的测试引导方法<a href="http://tossp.com/operating-system-the-production-of-pe-system-maintenance-tools-set.html">猛点这里</a>。</p>
<p>必须说，这不是一篇完整的教程，只是一个凌乱的笔记。</p>
<h1><a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>是什么</h1>
<p>在这里<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>就是给<a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a> 添加非常帅气的界面，需要注意的是<a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a>是从 0.4.4开始支持 <a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a> 菜单的。</p>
<h1>使用环境</h1>
<p>硬件：联想Y450+微硬盘</p>
<p>软件：<a href="http://nufans.net/grub4dos/grub_msys_v4.zip" class="broken_link">msys工具包</a>+<a href="http://nufans.net/grub4dos/gfxboot-3.3-custom.zip" class="broken_link">gfxmenu3.3</a>+<a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a> 0.4.4</p>
<h2>安装软件</h2>
<p>这没什么好说的，不过为了我后面介绍方便，在这里统一一下。</p>
<ol>
<li>解压msys工具包到D盘根目录；</li>
<li>运行一次D:\msys\msys.bat，然后关掉；</li>
<li>解压msys工具包到D:\msys\home\&lt;用户名（比如：imt）&gt;\；</li>
</ol>
<h1><a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>设置</h1>
<h2>生成<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>文件</h2>
<p><a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>的文件默认文件名是message，</p>
<p>运行D:\msys\msys.bat，输入命令</p>
<p>cd 3.3</p>
<p>make</p>
<p>很简单的就生成了一个message文件。</p>
<h2>把<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>引入<a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a></h2>
<p>打开<a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a>的MENU.LST</p>
<ol>
<li>注释掉splashimage</li>
<li>在splashimage的下面一行添加<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a> &lt;路径&gt;/message，以下是我的MENU.LST<br />
<blockquote><p>timeout 10<br />
default 6<br />
fontfile (hd0,0)/boot/grub/fonts<br />
#splashimage (hd0,0)/boot/grub/bj2008.xpm.gz<br />
<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a> (hd0,0)/boot/grub/message</p></blockquote>
</li>
</ol>
<p>就这样就好，不过默认的不一定是我们喜欢的，下面继续。</p>
<h2>修改背景图片</h2>
<ol>
<li>找一个自己喜欢的JPG图片，替换back.jpg就可以了，一般是800×600或者1024×768的</li>
<li>再make一下，重新生成message文件，就OK了</li>
</ol>
<h2>修改字体</h2>
<p>打开Makefile，找到：<br />
aafont:<br />
mkblfont -v -l 18 \<br />
-a  0x20-0x7e,0xa0-0xbf,0xc1-0xcb,0xcd-0xce,0xd0-0xd1,0xd3-0xd8,0xda-0xff \<br />
-t chs.txt \<br />
-f simsun:prop=2:space_width=4:size=17:nobitmap=1:autohint=1 \<br />
16x16.fnt &gt;16x16.log</p>
<p>可以把simsun改为其他值。控制面板的字体里显示了系统里所有的字体，只要把文件名里的后续去掉就行了。比如说，黑体是simhei。</p>
<p>po/bootloader.pot, po/zh_CN.po<br />
中英文的信息翻译，bin目录里是一些有用的工具，在README里有介绍。比如说，要加一个新翻译Boot Windows，可以在po目录里输入：</p>
<p>bin/add_text bwin "Boot Windows"</p>
<p>然后，打开zh_CN.po，找到</p>
<p>#. txt_bwin<br />
msgid "Boot Windows"<br />
msgstr ""</p>
<p>"" 改为 "启动Windows" 就行了。记得要使用UTF-8编码。</p>
<p>help-boot.en.html, help-boot.zh_CN.html, help-install.en.html,  help-install.zh_CN.html<br />
中英文帮助信息，可以按自己的需要进行修改。html语句不要用得太复杂，不然<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>可能处理不了。</p>
<p>结语</p>
<p>PS：本篇日志内容大量参考自http://bbs.znpc.net/和</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">
<h1 class="ContentTitle"><strong></strong><strong><a href="http://tossp.com/tag/grub4dos" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with grub4dos">grub4dos</a> </strong></h1>
</div>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/boot-use-gfxmenu-make-handsome-guide-interface.html#comments" title="to the comments">已有3条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/boot-use-<a href="http://tossp.com/tag/gfxmenu" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with gfxmenu">gfxmenu</a>-make-handsome-guide-interface.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;t=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29&amp;body=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;title=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;bm_description=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29&uri=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&amp;title=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29%20-%20http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&title=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fboot-use-gfxmenu-make-handsome-guide-interface.html&title=BOOT%3A%E4%BD%BF%E7%94%A8gfxmenu%E5%88%B6%E4%BD%9C%E5%B8%85%E6%B0%94%E7%9A%84%E5%BC%95%E5%AF%BC%E7%95%8C%E9%9D%A2%28%E6%9C%AA%E5%AE%8C%E6%88%90%E7%89%88%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/boot-use-gfxmenu-make-handsome-guide-interface.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>无法使用的支付宝手机客户端 V 2.1.0.0528(for BlackBerry 8820)</title>
		<link>http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html</link>
		<comments>http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html#comments</comments>
		<pubDate>Sun, 30 May 2010 14:10:25 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[我的资料]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[黑莓手机]]></category>
		<category><![CDATA[支付宝]]></category>
		<category><![CDATA[黑莓]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2141</guid>
		<description><![CDATA[支付宝手机客户端(for BlackBerry 8820)
其实没有写这种软件发布的习惯的，
但是，支付宝新发布的手机客服端 V 2.1.0.0528（黑莓版）
居然出现官方链接也无法正常安装的情况，实在是让人感到啼笑皆非
<div class="clear"></div><a href="http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html" title="无法使用的支付宝手机客户端 V 2.1.0.0528(for BlackBerry 8820)" rel="external" class="more-link">阅读全文-—共1124字</a>]]></description>
			<content:encoded><![CDATA[<h1>支付宝手机客户端(for BlackBerry 8820)</h1>
<p>其实没有写这种软件发布的习惯的，</p>
<p>但是，支付宝新发布的手机客服端<span style="text-decoration: underline;"> V 2.1.0.0528（黑莓版）</span></p>
<p>居然出现官方链接也无法正常安装的情况，实在是让人感到啼笑皆非</p>
<p>也许是期望越大，失望越大</p>
<p>最后在认真查看，支付宝提供的安装文件后，发现居然是打包错误，</p>
<p>给我的第一印象：这款软件是完全没通过严谨的测试的，他的安全性上是否能考的住？</p>
<p>好吧，仅仅是一个打包错误，哥自己重新打包，咱继续测试</p>
<h2>支付功能</h2>
<h3>目的：</h3>
<p>为手机充话费</p>
<h3>环境：</h3>
<ol>
<li>测试平台：黑莓8820（ROM4.5.0182）</li>
<li>网络环境：WIFI 中国移动</li>
<li>支付宝余额：0元</li>
</ol>
<h3>测试过程：</h3>
<p>安装支付宝黑莓版，通过媒体卡（我自己重新打包的）</p>
<p>启动支付宝，开通手机支付权限。</p>
<p>选择充值金额100元</p>
<p>确定充值，</p>
<p>然后就一直不停的充值～充值～充值～充值～充值～充值～充值～就是完成不鸟</p>
<p>无法取消，无法关闭，最后没办法了，重启</p>
<h3>结论：</h3>
<p>这个版本也是一个代谢产物，无法正常使用。<strong><span style="color: #ff0000;">不建议安装使用！</span></strong></p>
<h3><strong>总结：</strong></h3>
<p>那些国内首屈一指的IT公司，真的希望你们能严谨一点，多做一点测试，你连我的手机平台都占领不鸟，你的舞台还有多大？</p>
<blockquote><p>支付宝手机客户端是支付宝针对手机推出的客户端软件，主要包括如下功能：</p>
<h2>2.1 版本</h2>
<ul>
<li>【娱乐消费】:可以买彩票、Q币，还有近百种游戏点卡哦！</li>
<li>【话费充值】:在手机上为自己或他人手机充值，超方便，还有价格优惠哦；</li>
<li>【生活助手】:目前支持上海、重庆、南京、成都、杭州5大城市的公共事业缴费，其他城市陆续上线中；</li>
<li>【订单支付】用客户端为淘宝网和其它网站上拍下的商品付款，在网吧购物的用户可以放心付款了；还可支持使用红包支付！在交易查询菜单项中，选中未 付款交易就可对交易付款啦！</li>
<li>【确认收货】在交易查询菜单项中，选中已收到货品的交易可以做确认收货了！</li>
<li>【我要付款】：向其他支付宝用户进行付款；</li>
<li>【账户充值】：支持卡通、网上银行（招商银行、光大银行、工商银行、建设银行）和话费充值卡充值(全国神州行卡和联通一卡充)、网汇e充值；</li>
<li>【提现】：非实时提现，在1-2个工作日内即可将支付宝账户中的余额提现到指定关联银行卡中；</li>
<li>【卡通申请】：可以在客户端上申请开通卡通，不过还需要到银行进行签约激活才能正式使用卡通功能哦；</li>
<li>【查询功能】支持账户和交易明细的查询；</li>
</ul>
<p>为了个人隐私及账户安全，建议煤油前往支付宝官方网站下载：</p>
<p>手机下载：用手机登陆<a href="http://mobile.alipay.com/" target="_blank">m.alipay.com</a>，  然后点击首页手机支付宝下载通道。之后选择品牌或机型，下载安装包并安装。</p>
<p>官方下载：<a href="http://mobile.alipay.com/download.htm" target="_blank">支付宝手机客户端BlackBerry  黑莓版更新至 V 2.1.0.0528</a></p>
<li>【注册和更新】支持在手机上注册支付宝账户及对客户端检测更新，升级新版本；在客户端登录页面点右侧的“选项”按钮即可注册或检测更新哦；</li>
</blockquote>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html#comments" title="to the comments">已有7条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;t=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29&amp;body=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;title=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;bm_description=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29&uri=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&amp;title=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29%20-%20http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&title=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fdoes-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html&title=%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E7%9A%84%E6%94%AF%E4%BB%98%E5%AE%9D%E6%89%8B%E6%9C%BA%E5%AE%A2%E6%88%B7%E7%AB%AF%20V%202.1.0.0528%28for%20BlackBerry%208820%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/does-not-recommend-the-use-of-mobile-client-alipay-v-2-1-0-0528-for-blackberry-8820.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>PyThon学习笔记(7章)</title>
		<link>http://tossp.com/python-study-notes-7.html</link>
		<comments>http://tossp.com/python-study-notes-7.html#comments</comments>
		<pubDate>Wed, 26 May 2010 16:57:29 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2140</guid>
		<description><![CDATA[首先要说明，这套笔记不是我整理
有朋友知道原文出去麻烦告知一声，谢谢
映射和集合类型(chapter7)

<div class="clear"></div><a href="http://tossp.com/python-study-notes-7.html" title="PyThon学习笔记(7章)" rel="external" class="more-link">阅读全文-—共2421字</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon11.png" alt="" align="left" />首先要说明，这套笔记不是我整理</p>
<p>有朋友知道原文出去麻烦告知一声，谢谢</p>
<h1>映射和集合类型(chapter7)</h1>
<ol>
<li>
字典使用keys()获得键的列表, values()获得值的列表, items()获得包含key-&gt;value对的元组的列表</li>
<li>
字典的创建和赋值</p>
<ol>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span> = <span style="color: black;">&#123;</span>key: value<span style="color: black;">&#125;</span></span></code></li>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span> = <span style="color: #008000;">dict</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>key, value<span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span>key, value<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></span></code></li>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span>.<span style="color: black;">fromkeys</span><span style="color: black;">&#40;</span>sequence_keys, default_value<span style="color: black;">&#41;</span></span></code> 创建一个key是sequence_keys中元素的字典, 所有的value都是default_value, 如果不指定default_value, 默认是None</li>
</ol>
</li>
<li>
使用<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span>.<span style="color: black;">has_key</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></span></code>可以判断一个字典中是否有这个键, 该方法在后期<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>可能弃用, 推荐使用in和not in</li>
<li>
字典的键必须是可哈希的</li>
<li>
print中使用到字典的时候, 使用字符串格式化方式是非常优雅的</li>
<li>
<code class="codecolorer python default"><span class="python">dict1.<span style="color: black;">update</span><span style="color: black;">&#40;</span>dict2 | tuple_list<span style="color: black;">&#91;</span>, <span style="color: #66cc66;">**</span>key=value<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></span></code></p>
<ol>
<li>
将dict2字典更新到dict1中</li>
<li>
如果参数是一个元组列表, 将元组列表解析到dict1中(元组列表中每个元组必须有两个元素)</li>
<li>
可以在参数后面跟0—n个关键字参数, 以参数名: value的方式更新到dict1中</li>
</ol>
</li>
<li>
元素的删除</p>
<ol>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #ff7700;font-weight:bold;">del</span> <span style="color: #008000;">dict</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;key&quot;</span><span style="color: black;">&#93;</span></span></code>删除键是key的条目</li>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span>.<span style="color: black;">clear</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></span></code>  清空字典内的内容</li>
<li>
<code class="codecolorer python default"><span class="python"><span style="color: #008000;">dict</span>.<span style="color: black;">pop</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;name&quot;</span><span style="color: black;">&#41;</span></span></code> 删除键是key的条目并返回</li>
</ol>
</li>
<li>
映射类型操作符</p>
<ol>
<li>
标准类型操作符: &lt;, &gt;等比较操作符可以使用, 在比较过程中, 还是调用了字典的cmp方法, 但是, 字典的cmp方法中指示, 首先比较字典的长度, 然后比较键的大小, 最后比较值的大小</li>
<li>
字典查找操作: [], 成员关系操作: in, not in</li>
</ol>
</li>
<li>
dict工厂函数</p>
<ol>
<li>
接受不定关键字参数:<code class="codecolorer python default"><span class="python">&nbsp;<span style="color: #008000;">dict</span><span style="color: black;">&#40;</span>a = <span style="color: #ff4500;">1</span>, b = <span style="color: #ff4500;">2</span>, c = <span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span></span></code></li>
<li>
接受字典或关键字参数: 将原有的字典拷贝出来成为一个新的字典(这里使用的浅拷贝, 这里的浅拷贝得到的结果和使用copy函数得到的结果是一样的,但是, copy函数的效率更高)</li>
<li>
<code class="codecolorer python default"><span class="python">dict_instance.<span style="color: #dc143c;">copy</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></span></code>使用已有的字典拷贝一个字典(这里使用的也是浅拷贝)</li>
</ol>
</li>
<li>
系统内建函数</p>
<ol>
<li>
len(): 返回字典的key-value对的数目</li>
<li>
hash(): 这个函数不是为字典设计的, 但是它可以判断某个对象是否可以做一个字典的键, 将一个对象作为参数传递给hash(), 会返回这个对象的哈希值.  如果对象是不可哈希的, 会返回TypeError, 提示该对象是unhashable的</li>
<li>
sorted(dict):  返回dict的所有key排序后的列表</li>
</ol>
</li>
<li>
dict类型的内建方法</p>
<ol>
<li>
keys(): 返回字典的所有key的列表</li>
<li>
values(): 返回字典的所有value的列表</li>
<li>
items(): 返回字典的所有key-value的元组的列表</li>
<li>
get(key, default = None):  获取字典内key对应的值, 如果没有该key, 返回default指定的默认值</li>
<li>
setdefault(key, default=None): 如果字典中不存在key, 由dict[key]=default为其赋值</li>
<li>
iterkeys(), itervalues(), iteritems() 对应没有iter命名的方法, 这里使用了惰性赋值的迭代器, 节省内存</li>
</ol>
</li>
<li>
数字作为字典的键的时候, 只要值相同, 就代表相同的键, 比如, 1, 和1.0代表的就是相同的键</li>
<li>
键必须是可哈希的, 所有的不可变对象都是可哈希的, 可变对象如果在定义中定义了__hash__()方法, 那么就可以作为键</li>
<li>
如果元组中的值都是不可变类型的, 那么元组也可以作为字典的键</li>
<li>
集合sets有两种不同的类型, 可变集合set和不可变集合frozenset…可变集合也是不可哈希的…</li>
<li>
集合中不能有重复的元素, 如果有元素和已有元素重复, 就不会被插入.集合是无序的, 但是, 可以使用排序函数为它排序</li>
<li>
集合中可以使用的数学符号</li>
</ol>
<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon51.png" alt="" /></p>
<ol>
<li>
集合只能使用工厂函数set和frozenset创建</li>
<li>
访问集合中的数据使用循环, 或者使用成员关系操作符in, not in判断元素是否属于集合</li>
<li>
更新集合(只能是set, frozenset不能被更新)</p>
<ol>
<li>
add()  添加一个元素</li>
<li>
s.update()  接受一个序列类型的参数, 把该序列中有而集合中没有的元素添加到集合中</li>
<li>
s.remove()  从集合中移除一个元素</li>
</ol>
</li>
<li>
集合可用的标准类型操作符</p>
<ol>
<li>
成员关系: in, not in</li>
<li>
集合等价/不等价: ==, !=</li>
<li>
子集/超集: &lt;, &lt;=, &gt;, &gt;=</li>
</ol>
</li>
<li>
集合类型操作符(所有的集合类型)  集合互相操作的时候, 最后产生的集合是可变集合还是不可变集合取决于第一个参与操作的集合的类型</p>
<ol>
<li>
联合 |</li>
<li>
交集 &amp;</li>
<li>
差补/相对补集  -  A-B就返回属于A 但不属于B的元素集合</li>
<li>
对称差分   ^  A^B = A-B + B-A</li>
</ol>
</li>
<li>
可变集合特有的操作符</p>
<ol>
<li>
|=  相当于update方法, 并集赋值</li>
<li>
&amp;=  相当于intersection_update()方法, 交集赋值</li>
<li>
-=   相当于difference_update()方法, 差集赋值</li>
<li>
^=  相当于symmetric_difference_update()方法, 对称差分更新</li>
</ol>
</li>
<li>
集合类型的内部方法:</p>
<ol>
<li>
s.issubset(t)  判断s是不是t的子集</li>
<li>
s.issuperset(t)  判断s是不是t的超集</li>
<li>
s.union(t)   返回一个新集合, 该集合是s和t的并集</li>
<li>
s.intersection(t)  返回一个新集合, 该集合是s和t的交集</li>
<li>
s.difference(t)  返回一个新集合, 该集合是s的成员, 但不是t的成员, 即返回s不同于t的元素</li>
<li>
s.symmetric_defference(t)  返回所有s和t独有的(非共同拥有)元素集合</li>
<li>
s.copy()  返回一个s的浅拷贝, 效率比工厂要好</li>
</ol>
</li>
<li>
可变集合特有的方法: add, remove, discard, pop, clear, 这些接受对象的方法, 参数必须是可哈希的</li>
<li>
那些和操作符提供相同功能的函数, 有着更强的处理能力, 因为运算符两边的操作数必须都是集合, 然而函数可以接受任何的可迭代类型.</li>
</ol>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/python-study-notes-7.html#comments" title="to the comments">已有2条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>-study-notes-7.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;bodytext=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%98%A0%E5%B0%84%E5%92%8C%E9%9B%86%E5%90%88%E7%B1%BB%E5%9E%8B%28chapter7%29%0D%0A%0D%0A%09%0D%0A%E5%AD%97%E5%85%B8%E4%BD%BF%E7%94%A8keys%28%29%E8%8E%B7%E5%BE%97%E9%94%AE%E7%9A%84%E5%88%97%E8%A1%A8%2C%20values%28%29%E8%8E%B7%E5%BE%97%E5%80%BC%E7%9A%84%E5%88%97%E8%A1%A8%2C%20items%28%29%E8%8E%B7%E5%BE%97%E5%8C%85%E5%90%ABkey-%26gt%3Bvalue%E5%AF%B9%E7%9A%84%E5" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;notes=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%98%A0%E5%B0%84%E5%92%8C%E9%9B%86%E5%90%88%E7%B1%BB%E5%9E%8B%28chapter7%29%0D%0A%0D%0A%09%0D%0A%E5%AD%97%E5%85%B8%E4%BD%BF%E7%94%A8keys%28%29%E8%8E%B7%E5%BE%97%E9%94%AE%E7%9A%84%E5%88%97%E8%A1%A8%2C%20values%28%29%E8%8E%B7%E5%BE%97%E5%80%BC%E7%9A%84%E5%88%97%E8%A1%A8%2C%20items%28%29%E8%8E%B7%E5%BE%97%E5%8C%85%E5%90%ABkey-%26gt%3Bvalue%E5%AF%B9%E7%9A%84%E5" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;t=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;annotation=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%98%A0%E5%B0%84%E5%92%8C%E9%9B%86%E5%90%88%E7%B1%BB%E5%9E%8B%28chapter7%29%0D%0A%0D%0A%09%0D%0A%E5%AD%97%E5%85%B8%E4%BD%BF%E7%94%A8keys%28%29%E8%8E%B7%E5%BE%97%E9%94%AE%E7%9A%84%E5%88%97%E8%A1%A8%2C%20values%28%29%E8%8E%B7%E5%BE%97%E5%80%BC%E7%9A%84%E5%88%97%E8%A1%A8%2C%20items%28%29%E8%8E%B7%E5%BE%97%E5%8C%85%E5%90%ABkey-%26gt%3Bvalue%E5%AF%B9%E7%9A%84%E5" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;body=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;bm_description=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&amp;body=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%98%A0%E5%B0%84%E5%92%8C%E9%9B%86%E5%90%88%E7%B1%BB%E5%9E%8B%28chapter7%29%0D%0A%0D%0A%09%0D%0A%E5%AD%97%E5%85%B8%E4%BD%BF%E7%94%A8keys%28%29%E8%8E%B7%E5%BE%97%E9%94%AE%E7%9A%84%E5%88%97%E8%A1%A8%2C%20values%28%29%E8%8E%B7%E5%BE%97%E5%80%BC%E7%9A%84%E5%88%97%E8%A1%A8%2C%20items%28%29%E8%8E%B7%E5%BE%97%E5%8C%85%E5%90%ABkey-%26gt%3Bvalue%E5%AF%B9%E7%9A%84%E5" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&uri=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29%20-%20http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-7.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%287%E7%AB%A0%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/python-study-notes-7.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PyThon学习笔记(6章)</title>
		<link>http://tossp.com/python-study-notes-chapter-6.html</link>
		<comments>http://tossp.com/python-study-notes-chapter-6.html#comments</comments>
		<pubDate>Mon, 24 May 2010 16:55:19 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2139</guid>
		<description><![CDATA[首先要说明，这套笔记不是我整理
有朋友知道原文出去麻烦告知一声，谢谢
序列: 字符串, 列表和元组(chapter6)

<div class="clear"></div><a href="http://tossp.com/python-study-notes-chapter-6.html" title="PyThon学习笔记(6章)" rel="external" class="more-link">阅读全文-—共6313字</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon11.png" alt="" align="left" />首先要说明，这套笔记不是我整理</p>
<p>有朋友知道原文出去麻烦告知一声，谢谢</p>
<h1>序列: 字符串, 列表和元组(chapter6)</h1>
<ol>
<li>
对所有序列类型都适用的操作符(优先级从高到低, 不适用于复合类型的对象比较)</p>
<ol>
<li>
成员关系操作符: int, not in</li>
<li>
连接操作符: +</li>
<li>
重复操作符: *… sequence * int</li>
<li>
切片操作符: (利用子序列方式结合三种操作方式, 可以非常灵活的控制序列)</p>
<ol>
<li>
[], 索引取值</li>
<li>
[start : end], 索引范围取值</li>
<li>
[::step], 切片的步长</li>
<li>
切片操作符不会带来索引超出下标的异常</li>
</ol>
</li>
</ol>
</li>
<li>
list.extend(iterable): 把另外一个序列追加到list中.</li>
<li>
list.insert(index, object): 把一个元素object插入到list的index位置, 如果index是负数, 从后面向前数, 超过list下标后, 在末尾添加</li>
<li>
类型转换</p>
<ol>
<li>
list(iter)  把可迭代对象转换为列表</li>
<li>
str(obj)  把obj对象转换成字符串(对象的字符串表示法)</li>
<li>
unicode(obj)  把对象转换成Unicode字符串(使用默认编码), 使用u"汉字"可以得到其unicode编码</li>
<li>
basestring()  抽象工厂函数, 不能被实例化, 不能被调用, 仅作为str和unicode的父类</li>
<li>
tuple(iter)  把一个可迭代对象转换成元组对象</li>
<li>
enumerate(iterable)  生成由iterable每个元素的index值和item值组成的元组, 可以使用for key, value in enumerate的方式进行迭代</li>
<li>
max(iterable, key=None) | max(arg0, arg1, …, key=None) 返回iterable或arg0…中的最大值, 如果要指定key, 必须是一个可以传递给sort()方法的回调函数…..要使用key, 必须使用key=method_name的方式传参, key指定的函数接收的参数是迭代的当前元素, 在该函数中, 对元素进行处理, 返回一个对象, <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>会根据返回对象比较大小, 得到该结果最大的元素对应的list中的元素</li>
<li>
min同上面的max方法.  对于max和min方法, 如果是自定义类型, 又没有指定key, 那么默认是按照id(object)的结果计算的</li>
<li>
reversed(sequence)  返回逆序访问的迭代器</li>
<li>
sum(sequence, init=0)  返回sequence和可选参数init的总和, 等同于reduce(operator.add, sequence, init)</li>
<li>
sorted(iterable, func=None, key=None, reverse=False)  接受一个可迭代对象, 返回一个有序列表, 可选参数func, key, reverse含义和list.sort相同</li>
<li>
zip([item0, item1, …, itemn])  返回一个列表, [(item0, ), (item1, ), …, (itemn, )]</li>
<li>
sort(cmp=None, key=None, reverse=False)  将序列进行排序, cmp指定一个接受两个参数的回调函数, 该函数得到的两个参数是序列中的两个元素, 比较将按照cmp指定的回调函数进行, 返回数字类型的比较结果, , , key指定一个接受一个参数的回调函数句柄, 该参数就是迭代到的元素, 在比较之前, 将会根据这个回调函数对要比较的元素进行一次处理, 实际参与比较的是经过该回调函数处理之后的返回值.  reverse指示是否对比较结果进行逆序</li>
</ol>
</li>
<li>
利用已有功能函数定义动态参数的函数: method = lambda x, y: cmp(x + 10, y - 10), 调用时还是使用句柄加参数的方式: method(x, y)</li>
<li>
字符串: 如果先使用切片操作, 子串会被在内存中进行短时间的暂存, 可以通过id()得到值</li>
<li>
比较: 普通字符串按照ascii值比较, Unicode字符串按照unicode值比较.</li>
<li>
字符串切片, 下图是字符串切片的索引值, 如果开始或结束的索引值没有指定, 默认为0, 或-1. [::step]用于指定步长</li>
</ol>
<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon41.png" alt="" /></p>
<ol>
<li>
成员操作符: in, not in, 可以判断一个子串是否在字符串中存在…使用find(), index(), rfind(), rindex()可以获得子串在源中的位置</li>
<li>
string模块有一些预定义的字符串: ascii_letters, ascii_lowercase, ascii_uppercase, digits</li>
<li>
循环的改善: 如果循环的终止条件是不变的(一般都是不变的), 那么尽量不在循环终止条件中调用方法是一个好的习惯, 在大量数据的情况下(5 * 10^8数据), 改善的循环效率提升了4秒左右, 平均计算得到改善后循环每次效率提升约为7.154 * 10^-8s 也就是71.54 ns</li>
<li>
for-else方式的循环, else子句会在所有的元素都被循环完成之后执行, 如果break, 就不执行</li>
<li>
join可以用来连接字符串, 这样的效率是更高的, 因为+连接必须为每个字符串创建内存</li>
<li>
+连接字符串是运行时连接, "str1""str2"的方式则是编译时连接字符串</li>
<li>
普通字符串和unicode字符串连接, 会把普通字符串转换成unicode字符串进行连接</li>
<li>
%格式化字符串的参数:</p>
<ol>
<li>
%c  转换成字符(ascii值, 或长度为一的字符串)</li>
<li>
%r  优先使用repr()函数进行字符串转换</li>
<li>
%s  优先使用str()函数进行字符串转换</li>
<li>
%d / %i  转成有符号的十进制数</li>
<li>
%u  转成无符号的十进制数  遇到负号添加-号</li>
<li>
%o  转成无符号八进制数  遇到负号添加-号</li>
<li>
%x / %X  转成无符号十六进制数(x|X的大小写决定转换后得到十六进制数中的字母的大小写)   遇到负数, 则转换得到的结果中添加一个-号</li>
<li>
%e / %E  转成科学计数法(e | E的大小写决定转换后得到的e的大小写)</li>
<li>
%f / %F  转成浮点数(小数部分自然截断)</li>
<li>
%%  输出%号</li>
</ol>
</li>
<li>
其他格式化操作符辅助指令(位于%和格式化标识的中间)</p>
<ol>
<li>
*  定义宽度或小数点精度"adfas%*dfasdf" % (5, 2.000000888)</li>
<li>
–  用于左对齐</li>
<li>
+  在正数前加+号</li>
<li>
(sp)  在正数前显示空格</li>
<li>
#  在八进制前加0, 十六进制前显示0x或0X, 取决于用的是x或X    比如: "integer:%#X!" % 1984</li>
<li>
(var)    映射变量(字典参数)</li>
<li>
m.n   m是显示的最小总宽度, n是小数点后的位数</li>
</ol>
</li>
<li>
格式化字符串接收dict数据:"%(howmany)d days" % {"howmany": 28}</li>
<li>
字符串模板 s = Template('There are ${howmany} ${lang} Quotation Symbols')</p>
<ol>
<li>
s.substitute([key = value, key = value…])  这个函数必须提供所有的占位参数, 否则报错</li>
<li>
s.safe_substitute([key = value, key = value…])  和substitute功能是一样的, 都是转成得到一个字符串, 但是这个方法对参数没有要求, 如果没有提供对应的参数, 就直接输出.</li>
</ol>
</li>
<li>
原始字符串操作符(r/R), 紧贴字符串左引号, 不区分大小写. 用来使字符串描述各自原始的意义, 而不使用转义</li>
<li>
使用正则查找空白字符: m = re.search(r'\\[rtfvn]', r'Hello World!\n')…</li>
<li>
可以使用u | U '字符串'的方式创建unicode字符串, 该标识可以和r/R连用</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>参数有位置参数和关键字参数两种, 位置参数在定义时只有参数名, 关键字参数定义时是key=value的形式</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>也提供可变参, *为位置可变参, **为关键字可变参</li>
<li>
如果使用* | **方式传递实参, * 可以将序列参数转变成每个元素作为单独参数, **则可以将dict转换成关键字参数</li>
<li>
内建函数</p>
<ol>
<li>
cmp, 使用字符的ascii值进行比较(Unicode字符串按照unicode值比较)</li>
<li>
max, min, len, enumerate, zip, 其中zip可以接受多个参数, 按照下面方式返回:</li>
</ol>
<p>zip("abcd", "efg", "hijk", "lmn") 返回: [('a', 'e', 'h', 'l'), ('b', 'f', 'i', 'm'), ('c', 'g', 'j', 'n')]</p>
<ol>
<li>
str和unicode都是basestring的特化类, 但是, Unicode又包含(类之间仅仅是兄弟关系, 元素范围上有包含关系)str的表示范围</li>
<li>
chr(number), unichr(number), ord(string), chr和unichr分别用来把一个数字转换成一个对应类型的字符串, ord则是将一个string类型的单字符对象转换成为对应的ascii码或unicode编码</li>
</ol>
</li>
<li>
string模块的重要函数, 所有这些函数, 都可以省略第一个参数, 使用string.func的方式调用</p>
<ol>
<li>
string.index()和string.find()方法是一样的功能, 但是, index方法在查找不到字符串的时候, 会报一个异常, string.rfind(), string.rindex()用法相同, 是从右边开始查找</li>
<li>
string.join(sequence[, str]) 如果只有一个参数, 返回一个将所有元素插空一个空格的字符串(如果是序列, 转换成为字符串), 如果有两个参数, 把第二个参数向第一个参数的每个空位进行插空</li>
<li>
string.ljust(string, width[, fillchar])  填充fillchar(只能是一个字符)width个到string后面, 使string左对齐, 如果fillchar空, 填充空格, rjust为右对齐</li>
<li>
string.lower(), string.upper(), string.swapcase()大小写转换</li>
<li>
string.lstrip(), string.rstrip(), string.strip()  去除空格.</li>
<li>
string.split(string, sub, count)  将string截取sub, 从左向右截取count个, 返回list</li>
<li>
string.replace(string, old, new[, number=string.count(string, old)])  将string的old子串替换成new, 最多替换不超过number, number默认是old在string的数量</li>
<li>
string.translate</li>
<li>
string.zfill(string, width)  用width个0填充string的左面使其右对齐</li>
</ol>
</li>
<li>
unicode.encode(CODE_STRING) 按照指定编码方式编码字符串, decode反之, 按照指定编码方式解码</li>
<li>
除了pickle模块之外, 其他模块都已经支持unicode..</li>
<li>
UnicodeError异常在exceptions模块中定义, 是ValueError的子类, 所有关于Unicode编解码的异常都要继承自UnicodeError</li>
<li>
与字符串类型有关的模块:</p>
<ol>
<li>
string: 字符串相关操作函数和工具, 比如Template类</li>
<li>
re:  正则表达式</li>
<li>
struct: 字符串和二进制之间的转换</li>
<li>
c/StringIO  字符串缓冲对象, 操作方法类似于file对象</li>
<li>
base64  Base16, 32, 64数据编解码</li>
<li>
codecs   解码器注册和基类</li>
<li>
crypt  进行单方面加密</li>
<li>
difflib   找出序列间的不同</li>
<li>
hashlib   多种不同安全哈希算法和信息摘要算法的API</li>
<li>
hma    HMAC信息鉴权算法的<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>实现</li>
<li>
md5  RSA的MD5信息摘要鉴权</li>
<li>
rotor   提供多平台的加解密服务</li>
<li>
sha    NIAT的安全哈希算法SHA</li>
<li>
stringprep   提供用于IP协议的Unicode字符串</li>
<li>
textwrap   文本打包和填充</li>
<li>
unicodedata    Unicode数据库</li>
</ol>
</li>
<li>
字符串的关键点:</p>
<ol>
<li>
不可分字符类型</li>
<li>
类似printf()的格式化字符串</li>
<li>
三引号内可以接受特殊字符(What You See Is What You Get)</li>
<li>
r | R原始字符串</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>字符串不通过NUL或者\0结束</li>
</ol>
</li>
<li>
list的元素删除</p>
<ol>
<li>
del list[index]  根据index删除list中的元素</li>
<li>
list.remove(value)   从list中移除值是value的第一个元素</li>
<li>
list.pop()   类似栈的出栈操作, 弹出栈顶并返回</li>
</ol>
</li>
<li>
list的成员关系操作还是使用in | not in</li>
<li>
列表解析: [var_name for var_name in list if expression]if之后和for之前都可以使用var_name进行运算</li>
<li>
列表的比较操作, 隐式调用cmp方法, 比较规则是逐个扫描元素, 进行比较, 如果可以比较, 比较, 如果相等扫描下一个元素, 如果不相等返回结果, 如果两个元素类型不可以比较, 就比较两个对象的id()值.. 如果一直相等 ,直到一个列表扫描结束, 那么返回较长的列表较大</li>
<li>
序列类型函数</p>
<ol>
<li>
len(), max(), min()</li>
<li>
sorted() 和reversed()  返回的是被排序或逆序之后的序列, 不会改变序列本身的引用, 而序列自己的成员方法则会改变自身</li>
<li>
enumerate()  返回一个key=&gt;value方式的enumerate对象</li>
<li>
zip()  将多个列表压缩成为一个元组列表…..zip返回的元组列表可以使用足够元组内元素数量的参数来迭代遍历每一个元素, 例如: for a, b, c, d in zip(alist, blist, clist, dlist)</li>
<li>
使用list()和tuple()可以完成列表和元组之间的转换, 但是这种转换是值的转换, 所以他们是==的, 但是不是is的</li>
<li>
extend(列表)方法接受另外一个列表追加到原列表之后</li>
<li>
list.pop(index = -1)  list的pop可以弹出指定索引的值</li>
</ol>
</li>
<li>
处理一组对象的时候, 默认的是创建一个元组, 例如a = 1, 2, 3, 4 实际上是创建了一个元组(1, 2, 3, 4)</li>
<li>
单独使用del删除一个元组元素是不可行的, 只能通过重组</li>
<li>
元组的可变性: 元组的某一个元素指向了一个对象, 该对象是可变的, 那么改变该对象就相当于改变了元组的内容, 然而, 真正的我们的元组确实是没有改变的. It's so wizardly. 为什么呢? 元组内部持有的是对方的引用, 那个对象无论怎么变都还是在那里, 所以, 元组内部的值(内存地址)是没有改变的.</li>
<li>
函数可以返回多对象, 返回的实际也是一个元组</li>
<li>
单元素元组使用括号创建时需要在后面显示的加上", ", 由于括号被重载作为一个分组操作符了, 在这里会优先使用分组功能, 所以, 返回的总是原始类型</li>
<li>
相关模块:</p>
<ol>
<li>
数组array   受限的可变序列类型, 要求所有元素都是相同的类型</li>
<li>
operator   包含函数调用形式的序列操作符, operator.concat(m, n)相当于m+n</li>
<li>
re  perl风格的正则查找</li>
<li>
StringIO / cStringIO  长字符串作为文件来操作, 比如read(),  seek()函数……c版本的速度更快一些</li>
<li>
Textwrap  包裹/填充文本的函数</li>
<li>
types   包含<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>支持的所有类型</li>
<li>
collections  高性能容器数据类型</li>
<li>
UserList  包含了list对象的完全的类实现, 允许用户获得类似list的类, 用以派生新的类和功能</li>
</ol>
</li>
<li>
浅拷贝: 拷贝原对象中的内容, 但是新创建对象. 比如一个list的浅拷贝就是把list中元素的引用值拷贝过去…  浅拷贝实例: 完全切片操作, 利用工厂函数, 使用copy模块的copy函数</li>
<li>
深拷贝: 拷贝源对象中的内容, 如果某个属性(或序列中的元素)是可变对象, 把该可变对象的内容也进行拷贝</li>
<li>
非容器类型对象没有拷贝一说</li>
<li>
可变参: f(*args1, **args2), 如果关键字可变参不指定key值, 会被作为位置参数和前面的参数放到一个元组中….位置可变参在倒数第二个位置, 关键字可变参在倒数第一个位置.</li>
<li>
map(function, iterable), 应用function在iterable的每一个元素, 返回值作为新的序列的元素</li>
</ol>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/python-study-notes-chapter-6.html#comments" title="to the comments">已有1条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>-study-notes-chapter-6.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;bodytext=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%E5%BA%8F%E5%88%97%3A%20%E5%AD%97%E7%AC%A6%E4%B8%B2%2C%20%E5%88%97%E8%A1%A8%E5%92%8C%E5%85%83%E7%BB%84%28chapter6%29%0D%0A%0D%0A%09%0D%0A%E5%AF%B9%E6%89%80%E6%9C%89%E5%BA%8F%E5%88%97%E7%B1%BB%E5%9E%8B%E9%83%BD%E9%80%82%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E7%AC%A6%28%E4%BC%98%E5%85%88%E7%BA%A7%E4%BB%8E%E9%AB%98%E5%88%B0%E4%BD%8E%2C%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B%E7%9A%84%E5" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;notes=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%E5%BA%8F%E5%88%97%3A%20%E5%AD%97%E7%AC%A6%E4%B8%B2%2C%20%E5%88%97%E8%A1%A8%E5%92%8C%E5%85%83%E7%BB%84%28chapter6%29%0D%0A%0D%0A%09%0D%0A%E5%AF%B9%E6%89%80%E6%9C%89%E5%BA%8F%E5%88%97%E7%B1%BB%E5%9E%8B%E9%83%BD%E9%80%82%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E7%AC%A6%28%E4%BC%98%E5%85%88%E7%BA%A7%E4%BB%8E%E9%AB%98%E5%88%B0%E4%BD%8E%2C%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B%E7%9A%84%E5" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;t=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;annotation=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%E5%BA%8F%E5%88%97%3A%20%E5%AD%97%E7%AC%A6%E4%B8%B2%2C%20%E5%88%97%E8%A1%A8%E5%92%8C%E5%85%83%E7%BB%84%28chapter6%29%0D%0A%0D%0A%09%0D%0A%E5%AF%B9%E6%89%80%E6%9C%89%E5%BA%8F%E5%88%97%E7%B1%BB%E5%9E%8B%E9%83%BD%E9%80%82%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E7%AC%A6%28%E4%BC%98%E5%85%88%E7%BA%A7%E4%BB%8E%E9%AB%98%E5%88%B0%E4%BD%8E%2C%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B%E7%9A%84%E5" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;body=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;bm_description=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&amp;body=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%E5%BA%8F%E5%88%97%3A%20%E5%AD%97%E7%AC%A6%E4%B8%B2%2C%20%E5%88%97%E8%A1%A8%E5%92%8C%E5%85%83%E7%BB%84%28chapter6%29%0D%0A%0D%0A%09%0D%0A%E5%AF%B9%E6%89%80%E6%9C%89%E5%BA%8F%E5%88%97%E7%B1%BB%E5%9E%8B%E9%83%BD%E9%80%82%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E7%AC%A6%28%E4%BC%98%E5%85%88%E7%BA%A7%E4%BB%8E%E9%AB%98%E5%88%B0%E4%BD%8E%2C%20%E4%B8%8D%E9%80%82%E7%94%A8%E4%BA%8E%E5%A4%8D%E5%90%88%E7%B1%BB%E5%9E%8B%E7%9A%84%E5" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&uri=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29%20-%20http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-6.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%286%E7%AB%A0%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/python-study-notes-chapter-6.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PyThon学习笔记(5章)</title>
		<link>http://tossp.com/python-study-notes-chapter-5.html</link>
		<comments>http://tossp.com/python-study-notes-chapter-5.html#comments</comments>
		<pubDate>Sat, 22 May 2010 16:50:37 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2138</guid>
		<description><![CDATA[首先要说明，这套笔记不是我整理
有朋友知道原文出去麻烦告知一声，谢谢
数字(chapter5)

<div class="clear"></div><a href="http://tossp.com/python-study-notes-chapter-5.html" title="PyThon学习笔记(5章)" rel="external" class="more-link">阅读全文-—共1868字</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon11.png" alt="" align="left" />首先要说明，这套笔记不是我整理</p>
<p>有朋友知道原文出去麻烦告知一声，谢谢</p>
<h1>数字(chapter5)</h1>
<ol>
<li>
支持的数字类型: 整型, 长整型, 布尔型, 双精度浮点型, 十进制浮点型和复数</li>
<li>
整型</p>
<ol>
<li>
布尔型  包含True和False两个值的整型</li>
<li>
标准整数类型  0x表示十六进制, 无前缀表示十进制, 0表示八进制, 0b表示二进制</li>
<li>
长整型  整数后加L, 表示范围与可用内存大小有关..</li>
</ol>
</li>
<li>
双精度浮点数: 一个符号位, 52个底位, 11个指数位. 使用后缀e表示指数</li>
<li>
复数: 实数 + 序数J构成一个复数</p>
<ol>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>中的复数概念</p>
<ol>
<li>
虚数不能单独存在, 总是和一个值为0.0的实数部分一起构成一个复数</li>
<li>
复数由实数部分和虚数部分组成</li>
<li>
表示虚数的语法: real + imagJ</li>
<li>
实数部分和虚数部分都是浮点数</li>
<li>
虚数部分必须有后缀j或J</li>
</ol>
</li>
<li>
复数的内建属性</p>
<ol>
<li>
real 复数的实部</li>
<li>
imag 复数的虚部</li>
<li>
conjugate() 返回该复数的共轭复数</li>
</ol>
</li>
</ol>
</li>
<li>
强制类型转换规则</li>
</ol>
<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon31.png" alt="" /></p>
<ol>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>提供<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>解释器的启动参数Qdivision_style, -Qnew执行新的除法行为, -Qold执行传统除法行为, 默认是-Qold…-Qwarn和-Qwarnall可以用来度过过渡期</li>
<li>
幂运算符** 比左侧单目运算符优先级高, 比右侧单目运算符优先级高</li>
<li>
位运算符: ~, &amp;, |, ^, &lt;&lt;, &gt;&gt;</p>
<ol>
<li>
负数会被当成正数的二进制补码处理</li>
<li>
左移和右移N位等同与无溢出检查的2的N次幂运算</li>
<li>
长整数的位运算使用一种经过修改的二进制补码形式, 使的符号位可以无限左移</li>
<li>
~是单目运算符</li>
</ol>
</li>
<li>
内建函数和工厂函数</p>
<ol>
<li>
数字类型函数:</p>
<ol>
<li>
转换工厂函数: int(), long(), float(), complex(), 接受参数第一个是要转换的值, 第二个是进制..如果要转换的值是string才能使用第二个函数指定进制.</p>
<ol>
<li>
python2.2开始, 加入了bool(), 用来将整数1和0转换成为标准布尔值(所有非0数都返回True).</li>
<li>
python2.3的标准数据类型添加了Boolean类型, true和false也有了常量值True和False, 而不再是1和0</li>
<li>
bool(obj) 返回obj对象的布尔值, 也就是obj.__nonzero__()</li>
<li>
complex(real, imag=0.0)</li>
</ol>
</li>
<li>
功能函数</p>
<ol>
<li>
abs(number) 返回数字的绝对值, 如果是复数, 返回math.sqrt(num.real2 + num.imag2)</li>
<li>
coerce(number1, number2): 返回按照类型转换规则转换得到的两个数字组成的元组</li>
<li>
divmod(number1, number2)  返回一个包含商和余数的元组, 整数返回地板除和取余操作结果, 浮点数返回的商部分是math.floor(number1/number2), 复数的商部分是ath.floor((number1/number2).real)</li>
<li>
pow()和**功能相同</li>
<li>
round(number[, base]) 对浮点数进行四舍五入运算, base参数是小数位参数, 如果不指定, 返回与第一个参数最接近的整数的浮点形式</li>
<li>
int() 直接去掉小数部分, floor()得到最接近但小于原数的整数, round()得到最接近原数的整数</li>
</ol>
</li>
<li>
整数的内建函数: hex(), oct(), bin()…ord("A") 接受一个ascii或unicode字符, 返回相应的unicode值 <span style="font-family: Wingdings;">?è</span> char(65L)接受unicode码值, 返回对应的unicode字符.</li>
</ol>
</li>
</ol>
</li>
<li>
其他数字类型</p>
<ol>
<li>
布尔数:</p>
<ol>
<li>
布尔型是整型的子类, 但是不能再被继承而生成它的子类.</li>
<li>
没有__nonzero__()方法的对象默认值是True</li>
<li>
对于值为0的任何数字或空集(空的list|tuple|dict)在<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>中值都是False</li>
<li>
数学运算中, True ==1, False == 0</li>
</ol>
</li>
<li>
十进制浮点数: from decimal import Decimal</li>
</ol>
</li>
<li>
数字科学计算的包</p>
<ol>
<li>
高级的Third package: Numeric(NumPy)</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>自带的数字类型相关模块</p>
<ol>
<li>
decimal  十进制浮点运算类Decimal</li>
<li>
array  高效数值数组(字符, 整数, 浮点数)</li>
<li>
match/cmatch  标准c库数学运算函数. 常规数学运算在match, 复数运算在cmatch</li>
<li>
operator  数字运算符的函数实现</li>
<li>
random  伪随机数生成器</p>
<ol>
<li>
randint(start, end)随机生成start, end之间的一个整数</li>
<li>
uniform(start, end)随机生成范围内的一个浮点数</li>
<li>
randrange([start ,]stop[, step])随机生成start, stop内按step步增数字范围的一个整数</li>
<li>
choice(sequence)随机返回给定的序列中的一个元素</li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
</ol>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/python-study-notes-chapter-5.html#comments" title="to the comments">已有1条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>-study-notes-chapter-5.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;bodytext=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%95%B0%E5%AD%97%28chapter5%29%0D%0A%0D%0A%09%0D%0A%E6%94%AF%E6%8C%81%E7%9A%84%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B%3A%20%E6%95%B4%E5%9E%8B%2C%20%E9%95%BF%E6%95%B4%E5%9E%8B%2C%20%E5%B8%83%E5%B0%94%E5%9E%8B%2C%20%E5%8F%8C%E7%B2%BE%E5%BA%A6%E6%B5%AE%E7%82%B9%E5%9E%8B%2C%20%E5%8D%81%E8%BF%9B%E5%88%B6%E6%B5%AE%E7%82%B9%E5%9E%8B%E5%92%8C%E5%A4%8D%E6%95%B0%0D%0A%09%0D%0A%E6%95%B4%E5%9E%8B%0D%0A%0D%0A%09%0D%0A%E5%B8" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;notes=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%95%B0%E5%AD%97%28chapter5%29%0D%0A%0D%0A%09%0D%0A%E6%94%AF%E6%8C%81%E7%9A%84%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B%3A%20%E6%95%B4%E5%9E%8B%2C%20%E9%95%BF%E6%95%B4%E5%9E%8B%2C%20%E5%B8%83%E5%B0%94%E5%9E%8B%2C%20%E5%8F%8C%E7%B2%BE%E5%BA%A6%E6%B5%AE%E7%82%B9%E5%9E%8B%2C%20%E5%8D%81%E8%BF%9B%E5%88%B6%E6%B5%AE%E7%82%B9%E5%9E%8B%E5%92%8C%E5%A4%8D%E6%95%B0%0D%0A%09%0D%0A%E6%95%B4%E5%9E%8B%0D%0A%0D%0A%09%0D%0A%E5%B8" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;t=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;annotation=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%95%B0%E5%AD%97%28chapter5%29%0D%0A%0D%0A%09%0D%0A%E6%94%AF%E6%8C%81%E7%9A%84%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B%3A%20%E6%95%B4%E5%9E%8B%2C%20%E9%95%BF%E6%95%B4%E5%9E%8B%2C%20%E5%B8%83%E5%B0%94%E5%9E%8B%2C%20%E5%8F%8C%E7%B2%BE%E5%BA%A6%E6%B5%AE%E7%82%B9%E5%9E%8B%2C%20%E5%8D%81%E8%BF%9B%E5%88%B6%E6%B5%AE%E7%82%B9%E5%9E%8B%E5%92%8C%E5%A4%8D%E6%95%B0%0D%0A%09%0D%0A%E6%95%B4%E5%9E%8B%0D%0A%0D%0A%09%0D%0A%E5%B8" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;body=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;bm_description=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&amp;body=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0A%0D%0A%E6%95%B0%E5%AD%97%28chapter5%29%0D%0A%0D%0A%09%0D%0A%E6%94%AF%E6%8C%81%E7%9A%84%E6%95%B0%E5%AD%97%E7%B1%BB%E5%9E%8B%3A%20%E6%95%B4%E5%9E%8B%2C%20%E9%95%BF%E6%95%B4%E5%9E%8B%2C%20%E5%B8%83%E5%B0%94%E5%9E%8B%2C%20%E5%8F%8C%E7%B2%BE%E5%BA%A6%E6%B5%AE%E7%82%B9%E5%9E%8B%2C%20%E5%8D%81%E8%BF%9B%E5%88%B6%E6%B5%AE%E7%82%B9%E5%9E%8B%E5%92%8C%E5%A4%8D%E6%95%B0%0D%0A%09%0D%0A%E6%95%B4%E5%9E%8B%0D%0A%0D%0A%09%0D%0A%E5%B8" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&uri=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29%20-%20http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-5.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%285%E7%AB%A0%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/python-study-notes-chapter-5.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PyThon学习笔记(4章)</title>
		<link>http://tossp.com/python-study-notes-chapter-4.html</link>
		<comments>http://tossp.com/python-study-notes-chapter-4.html#comments</comments>
		<pubDate>Thu, 20 May 2010 16:47:20 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2137</guid>
		<description><![CDATA[首先要说明，这套笔记不是我整理
有朋友知道原文出去麻烦告知一声，谢谢
python对象(chapter4)

<div class="clear"></div><a href="http://tossp.com/python-study-notes-chapter-4.html" title="PyThon学习笔记(4章)" rel="external" class="more-link">阅读全文-—共2643字</a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon11.png" alt="" align="left" />首先要说明，这套笔记不是我整理</p>
<p>有朋友知道原文出去麻烦告知一声，谢谢</p>
<h1><a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>对象(chapter4)</h1>
<ol>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>对象有三个特征: 身份和类型是只读的, 如果对象支持不支持更新操作, 那么值也就是只读的.</p>
<ol>
<li>
身份: 唯一的身份标识, 可以使用内建函数id()得到, 可以看作是对象的内存地址…</li>
<li>
类型: 对象的类型决定该对象保存什么类型的值, 可以进行什么操作, 遵循什么规则., 可以使用内建函数type()查看<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>对象的类型.</li>
<li>
值: 对象表示的数据项</li>
</ol>
</li>
<li>
对象属性: 主要有属性, 值, 相关联的可执行代码(method), 一些<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>类型也有数据属性, 含有数据属性的对象包括但不限于: 类, 类实例, 模块, 复数, 文件.</li>
<li>
基础数据类型: 数字, 整形, 布尔型, 长整型, 浮点型, 复数型, 字符串, 列表, 元组, 字典.</li>
<li>
其他内建类型: 类型, None, 文件, 集合/固定集合, 函数/方法, 模块, 类</p>
<ol>
<li>
type(type(1)) 可以看出类型对象本身也是对象, 它的类型是type</li>
<li>
None的类型是NoneType, NoneType只有一个值, 就是None, 不支持任何运算也没有任何内建方法, 布尔值总返回False</li>
</ol>
</li>
<li>
每个对象天生都有布尔值, 以下对象的布尔值是False</p>
<ol>
<li>
None</li>
<li>
False(bool类型)</li>
<li>
所有值为0的数</li>
<li>
'' 空字符串</li>
<li>
[] | () | {} 空列表, 空元组, 空字典</li>
<li>
用户创建的实例如果定义了nonzero(__nonzero__())或length(__len__())且值为0, 那么返回的布尔值也是False</li>
</ol>
</li>
<li>
当要获取一个对象的布尔值的时候, 首先会调用__nonzero__(必须返回布尔类型或者int类型.)方法, 如果实现了该方法, 就返回该方法返回的布尔值, 如果没有实现该方法, 继续调用__len__方法(该方法返回值必须是大于等于0的), 如果实现了__len__方法, 就根据其返回值返回布尔值.</li>
<li>
内部类型: <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>内部机制</p>
<ol>
<li>
代码: 编译过的<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>的源代码片段, 是可执行对象. 通过调用内建函数compile()可以得到代码对象. 代码对象可以被exec命令或eval()内建函数来执行.   代码是用户自定义函数的核心, 运行期获得上下文..  __code__是函数的一个属性, 函数除了代码这个属性, 还有函数名, 文档字符串, 默认参数, 全局命名空间等必须的属性</li>
<li>
帧对象: 用于跟踪记录对象</li>
<li>
跟踪记录: 用于异常发生时, 程序访问跟踪记录对象处理程序.</li>
<li>
切片:</p>
<ol>
<li>
步进切片sequence[::number] number为负数, 倒序显示字符串, 正数则正序显示字符串, 数值代表显示字符的step值.</li>
<li>
多维切片 sequence[start1: end1, start2: end2]</li>
<li>
省略切片 sequence[…, start1: end1]</li>
<li>
切片对象 使用slice([start, ]stop[, step])可以创建一个切片对象</li>
</ol>
</li>
<li>
省略对象: 用于扩展切片语法, 起记号作用..在切片语法中表示省略号, 省略对象有一个唯一的名字Ellipsis, 布尔值始终是True</li>
<li>
Xrange: 调用xrange()生成Xrange对象, 类似内建函数range, 用于节省内存使用或range无法完成的超大数据集场合</li>
</ol>
</li>
<li>
标准类型运算符</p>
<ol>
<li>
对象值比较</p>
<ol>
<li>
数字根据大小比较</li>
<li>
字符串根据字符先后顺序比较</li>
<li>
list | tuple | dict顺序按照其中元素(dict按照键)比较</li>
<li>
链式比较相当于多个比较使用and连接</li>
<li>
自定义类型对象的比较是引用值比较, 也就是id(object_name)的比较</li>
</ol>
</li>
<li>
对象身份比较</p>
<ol>
<li>
is / is not用来比较两个别名是否引用同一个对象</li>
<li>
整数对象和字符串对象是不可变对象…</li>
</ol>
</li>
<li>
布尔类型运算符: and, or, not</li>
</ol>
</li>
<li>
标准类型内建函数</p>
<ol>
<li>
cmp(obj1, obj2)  比较obj1和obj2, 根据比较结果返回整数i, i&lt;0 <span style="font-family: Wingdings;">à</span> obj1&lt;obj2, i&gt;0 <span style="font-family: Wingdings;">à</span> obj1&gt;obj2, i==0 <span style="font-family: Wingdings;">à</span> obj1 == obj2….自定义类型中通过定义方法__cmp__(target)来实现….使用比较运算符, 或直接调用cmp时该方法被调用</li>
<li>
type(obj)  得到一个对象的类型, 返回相应的type对象</li>
<li>
str(obj)  返回对象适合可读性好的字符串表示…在自定义类中使用__str__(self)返回一个字符串, 调用str(obj)时会被隐式调用</li>
<li>
repr(obj)  返回一个对象的字符串表示, repr返回的字符串通常可以被用于使用eval动态创建一个对象.  通常 obj == eval(repr(obj))是成立的</li>
<li>
``, 反单引号, `obj`和repr(obj)做的事情是一样的.</li>
<li>
isinstance(obj, (type[, type, …]))  判断obj是不是第二个参数tuple中的列举的类型的实例</li>
<li>
types模块提供一些已知的类型</li>
<li>
由于每一种类型都只有一个类型对象, 所以, 可以使用引用比较代替值比较以提升性能: 用if type(num) is types.IntType 替代if type(num) == types.IntType</li>
<li>
from-import: 只引入某个模块的一部分属性: 比如from types import IntType 这样做可以有效的减少查询次数</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>的operator模块中有绝大多数运算符对应的同功能的函数可供使用.</li>
</ol>
</li>
<li>
类型工厂函数: int(), long(), float(), complex(), str(), Unicode(), basestring(), list(), tuple(), type(), dict(), bool(), set(), frozenset(), object(), classmethod(), staticmethod(), super(), property(), file()</li>
<li>
标准类型的分类:</p>
<ol>
<li>
标准类型是"基本内建数据对象原始类型"</p>
<ol>
<li>
基本: 是<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>的标准或核心</li>
<li>
内建: <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>默认提供</li>
<li>
数据: 用于一般数据存储</li>
<li>
对象: 对象是数据和功能的默认抽象</li>
<li>
原始: 这些类型提供的是最底层的粒度数据存储</li>
<li>
类型: 本身就是数据类型</li>
</ol>
</li>
<li>
按存储模型进行分类:</p>
<ol>
<li>
标量/原子类型: 数值, 字符串等可以存储单一字面对象的类型.</li>
<li>
容器类型: 列表, 元素, 字典等可以存储多个字面变量的类型, <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>中的容器类型都可以存储不同类型的元素</li>
</ol>
</li>
<li>
按更新模型进行分类:  对象创建之后, 值不可以改变, 注意: 这里是对象, 而不是变量</p>
<ol>
<li>
可变类型: 列表, 字典</li>
<li>
不可变类型: 数字, 字符串, 元组</li>
</ol>
</li>
<li>
按访问模型进行分类: 访问对象的方式</p>
<ol>
<li>
直接访问: 数值</li>
<li>
顺序访问: 列表, 元组, 字符串等可以按照索引访问的类型</li>
<li>
映射访问: 字典</li>
</ol>
</li>
</ol>
</li>
<li>
不支持的类型: char, byte, pointer</li>
</ol>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/python-study-notes-chapter-4.html#comments" title="to the comments">已有5条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>-study-notes-chapter-4.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;bodytext=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0Apython%E5%AF%B9%E8%B1%A1%28chapter4%29%0D%0A%0D%0A%09%0D%0Apython%E5%AF%B9%E8%B1%A1%E6%9C%89%E4%B8%89%E4%B8%AA%E7%89%B9%E5%BE%81%3A%20%E8%BA%AB%E4%BB%BD%E5%92%8C%E7%B1%BB%E5%9E%8B%E6%98%AF%E5%8F%AA%E8%AF%BB%E7%9A%84%2C%20%E5%A6%82%E6%9E%9C%E5%AF%B9%E8%B1%A1%E6%94%AF%E6%8C%81%E4%B8%8D%E6%94%AF%E6%8C%81%E6%9B%B4%E6%96%B0%E6%93%8D%E4%BD%9C%2C%20%E9%82%A3%E4%B9%88%E5%80%BC%E4%B9%9F%E5%B0%B1%E6%98" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;notes=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0Apython%E5%AF%B9%E8%B1%A1%28chapter4%29%0D%0A%0D%0A%09%0D%0Apython%E5%AF%B9%E8%B1%A1%E6%9C%89%E4%B8%89%E4%B8%AA%E7%89%B9%E5%BE%81%3A%20%E8%BA%AB%E4%BB%BD%E5%92%8C%E7%B1%BB%E5%9E%8B%E6%98%AF%E5%8F%AA%E8%AF%BB%E7%9A%84%2C%20%E5%A6%82%E6%9E%9C%E5%AF%B9%E8%B1%A1%E6%94%AF%E6%8C%81%E4%B8%8D%E6%94%AF%E6%8C%81%E6%9B%B4%E6%96%B0%E6%93%8D%E4%BD%9C%2C%20%E9%82%A3%E4%B9%88%E5%80%BC%E4%B9%9F%E5%B0%B1%E6%98" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;t=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;annotation=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0Apython%E5%AF%B9%E8%B1%A1%28chapter4%29%0D%0A%0D%0A%09%0D%0Apython%E5%AF%B9%E8%B1%A1%E6%9C%89%E4%B8%89%E4%B8%AA%E7%89%B9%E5%BE%81%3A%20%E8%BA%AB%E4%BB%BD%E5%92%8C%E7%B1%BB%E5%9E%8B%E6%98%AF%E5%8F%AA%E8%AF%BB%E7%9A%84%2C%20%E5%A6%82%E6%9E%9C%E5%AF%B9%E8%B1%A1%E6%94%AF%E6%8C%81%E4%B8%8D%E6%94%AF%E6%8C%81%E6%9B%B4%E6%96%B0%E6%93%8D%E4%BD%9C%2C%20%E9%82%A3%E4%B9%88%E5%80%BC%E4%B9%9F%E5%B0%B1%E6%98" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;body=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;bm_description=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&amp;body=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0Apython%E5%AF%B9%E8%B1%A1%28chapter4%29%0D%0A%0D%0A%09%0D%0Apython%E5%AF%B9%E8%B1%A1%E6%9C%89%E4%B8%89%E4%B8%AA%E7%89%B9%E5%BE%81%3A%20%E8%BA%AB%E4%BB%BD%E5%92%8C%E7%B1%BB%E5%9E%8B%E6%98%AF%E5%8F%AA%E8%AF%BB%E7%9A%84%2C%20%E5%A6%82%E6%9E%9C%E5%AF%B9%E8%B1%A1%E6%94%AF%E6%8C%81%E4%B8%8D%E6%94%AF%E6%8C%81%E6%9B%B4%E6%96%B0%E6%93%8D%E4%BD%9C%2C%20%E9%82%A3%E4%B9%88%E5%80%BC%E4%B9%9F%E5%B0%B1%E6%98" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&uri=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29%20-%20http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-chapter-4.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%284%E7%AB%A0%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/python-study-notes-chapter-4.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PyThon学习笔记(3章)</title>
		<link>http://tossp.com/python-study-notes-3-chapters.html</link>
		<comments>http://tossp.com/python-study-notes-3-chapters.html#comments</comments>
		<pubDate>Tue, 18 May 2010 16:44:17 +0000</pubDate>
		<dc:creator>砼砼</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[打死电脑]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[学习]]></category>

		<guid isPermaLink="false">http://tossp.com/?p=2136</guid>
		<description><![CDATA[这篇日志在2010-05-20 00:46:02最后一次修订。首先要说明，这套笔记不是我整理
有朋友知道原文出去麻烦告知一声，谢谢
Python基础(chapter3)

<div class="clear"></div><a href="http://tossp.com/python-study-notes-3-chapters.html" title="PyThon学习笔记(3章)" rel="external" class="more-link">阅读全文-—共2413字</a>]]></description>
			<content:encoded><![CDATA[<div class="revised">这篇日志在<abbr title="星期四, 05月 20th, 2010, 12:46 am">2010-05-20 00:46:02</abbr>最后一次修订。</div><br /><p><img src="http://tossp.com/wp-content/uploads/2010/05/051710_1524_PyThon11.png" alt="" align="left" />首先要说明，这套笔记不是我整理</p>
<p>有朋友知道原文出去麻烦告知一声，谢谢</p>
<h1><a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">Python</a>基础(chapter3)</h1>
<ol>
<li>
setence and syntax语句和语法</p>
<ol>
<li>
#为注释符号</li>
<li>
\n是标准行分隔符, 通常一个语句一行</li>
<li>
反斜线\表示下一行继续, 用来将单条语句放入多行…尽量使用括号代替</li>
<li>
分号;表示将两个语句连接在一行中…不提倡</li>
<li>
冒号:表示将代码块的头和体分开</li>
<li>
语句(代码块)用缩进块方式体现: 同一个代码组的代码必须严格左对齐..由于不同的editor制表符宽度不一, 为了使代码跨平台, 推荐使用4个空格缩进</li>
<li>
不同缩进深度分隔不同的代码块</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>文件以模块的形式组织: 模块以磁盘文件的形式存在, 不应该让某个模块充斥的太大</li>
</ol>
</li>
<li>
赋值</p>
<ol>
<li>
赋值语句没有返回值, 但可以使用链式赋值</li>
<li>
python2.0开始支持增量赋值(算符和等号连接赋值), 但是<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>不支持++, --</li>
<li>
赋值操作中, 可变对象会被直接修改(引用位置值的修改), 不可变对象则被重新赋予新的对象(引用修改)</li>
<li>
多元赋值: a, b, c = 1, 2, 'string', 建议使用tuple的方式进行多元赋值: (a, b, c) = (1, 2, 'string')</li>
</ol>
</li>
<li>
swap操作: x, y = y, x</li>
<li>
标识符</p>
<ol>
<li>
大小写敏感</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>的关键字列表和iskeyword()函数在keyword模块, 方便查阅</li>
<li>
内建: built-in可以看作是系统保留字….对于一些内建函数需要覆盖(重定义, 替换)…built-in是__builtins__模块的成员, 该模块由解释器自动导入</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>不支持重载</li>
<li>
下划线: 作为变量前缀和后缀指定特殊变量</p>
<ol>
<li>
_xxx: 不用'from module import*'导入</li>
<li>
__xxx__: 系统定义名字</li>
<li>
_xxx: 类中的私有变量名</li>
</ol>
</li>
</ol>
</li>
<li>
<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>之禅</li>
</ol>
<p>The Zen of <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">Python</a>, by Tim Peters</p>
<p><a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>之禅. 作者Tim Peters</p>
<p>Beautiful is better than ugly.</p>
<p>漂亮胜于丑陋</p>
<p>Explicit is better than implicit.</p>
<p>详尽胜于含蓄</p>
<p>Simple is better than complex.</p>
<p>简单胜于复杂</p>
<p>Complex is better than complicated.</p>
<p>组合胜于复杂(结构)</p>
<p>Flat is better than nested.</p>
<p>单一胜于嵌套</p>
<p>Sparse is better than dense.</p>
<p>稀少胜于繁杂</p>
<p>Readability counts.</p>
<p>可读性价值</p>
<p>Special cases aren't special enough to break the rules.</p>
<p>特例不足以违反规则</p>
<p>Although practicality beats purity.</p>
<p>实践胜于理论</p>
<p>Errors should never pass silently.</p>
<p>错误可能从不沉默</p>
<p>Unless explicitly silenced.</p>
<p>除非明白沉默</p>
<p>In the face of ambiguity, refuse the temptation to guess.</p>
<p>面对歧义, 不被猜想诱惑</p>
<p>There should be one-- and preferably only one --obvious way to do it.</p>
<p>可能仅有一种更好的方法</p>
<p>Although that way may not be obvious at first unless you're Dutch.</p>
<p>Now is better than never.</p>
<p>现在胜于一切</p>
<p>Although never is often better than *right* now.</p>
<p>If the implementation is hard to explain, it's a bad idea.</p>
<p>难于解释的实现是不好的</p>
<p>If the implementation is easy to explain, it may be a good idea.</p>
<p>易于明白的实现可能是个好方案</p>
<p>Namespaces are one honking great idea -- let's do more of those!</p>
<p>名空间是一个好方案, 让我们去超越这些</p>
<ol>
<li>
模块组织</li>
</ol>
<p># 起始行</p>
<p># 模块文档</p>
<p># 模块导入</p>
<p># 变量定义</p>
<p># 类定义</p>
<p># 函数定义</p>
<p># 主程序</p>
<ol>
<li>
__name__用于指示模块应该如何被加载, 如果值是"__main__"说明是主模块, 如果是模块名, 说明是被导入的</li>
<li>
主模块测试代码</li>
</ol>
<div class="codecolorer-container python blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># business process</span><br />
<span style="color: #ff7700;font-weight:bold;">if</span><span style="color: black;">&#40;</span>__name__ == <span style="color: #483d8b;">'__main__'</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></div>
<ol>
<li>
内存管理</p>
<ol>
<li>
基本</p>
<ol>
<li>
弱类型 – 动态类型</li>
<li>
programmer不关心内存管理</li>
<li>
变量并会被回收</li>
<li>
del语句能够直接释放资源</li>
</ol>
</li>
<li>
变量未初始化不允许使用</li>
<li>
引用计数: 对于一个内存堆中的对象, 有多少个指针引用它..引用计数就是多少, 引用计数为0时, 该对象可以被垃圾回收器回收</p>
<ol>
<li>
增加</p>
<ol>
<li>
对象创建</li>
<li>
别名创建(引用赋值)</li>
<li>
参数传递(引用传值)</li>
<li>
被容器引用</li>
</ol>
</li>
<li>
减少</p>
<ol>
<li>
引用生命周期结束</li>
<li>
对象别名被显示销毁 del y</li>
<li>
对象别名被赋予其他引用</li>
<li>
窗口对象本身被销毁</li>
</ol>
</li>
<li>
del</p>
<ol>
<li>
从现在的名字空间中删除一个别名</li>
<li>
对象的引用计数减一</li>
</ol>
</li>
</ol>
</li>
<li>
垃圾回收: 有对象引用计数为0, 对象被显示告知需要销毁, 有内存消耗大户存在导致系统压力较大时, 垃圾回收机制运行, 清理需要回收的内存区域…垃圾回收机制还有一个循环垃圾回收器, 确保释放循环引用对象(a引用b, b引用a, 导致其引用计数永远不为0)</li>
</ol>
</li>
<li>
将引入的其他模块中常用的变量重新赋予一个本地别名(ls = os.linesep)不仅可以避免冗长的变量名, 又可以提高加载速度(因为现在是本地变量了)</li>
<li>
重要的其他模块</p>
<ol>
<li>
debugger: pdb允许设置断点, 逐行调试, 检查堆栈, 还支持事后调试</li>
<li>
logger: logging分紧急, 错误, 警告, 信息, 调试五级日志</li>
<li>
profilers: 性能测试器</p>
<ol>
<li>
profile: <a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>编写, 测试函数执行时间, 每次脚本执行总时间.</li>
<li>
hotshot: python2.2, c编写, 解决了性能测试过载问题, 但需要更多时间生成结果, python2.5修正了hotshot的时间计量bug</li>
<li>
cProfile: python2.5, c编写, 需要较长时间从日志文件载入分析结果, 不支持子函数状态细节, 某些结果不准</li>
</ol>
</li>
</ol>
</li>
</ol>
<hr /><h1 >新域名tossp.com已启用，请到<a rel="home" href="http://tossp.com/">http://tossp.com/</a>更换订阅地址</h1><hr /><small>&copy; 2009 <a rel="home" href="http://tossp.com/">砼砼's blog</a> 版权所有,转载务必注明出处.<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/cn/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-sa/2.5/cn/88x31.png" /></a><br />
这个Feed只供个人使用,禁止未注明的转载或商业应用。非法应用的,一切法律后果自负.如有问题,可发E-mail至blog@tossp.com<br />
（数字签名： b651ebdea0fdde249a8a03164e0202dedoubanclaim02e73b010717275c）<br />
<a href="http://tossp.com/python-study-notes-3-chapters.html#comments" title="to the comments">已有4条评论</a>, 发布人: <a href="http://im-t.net/" >砼砼</a>，trackback地址：http://tossp.com/<a href="http://tossp.com/tag/python" class="st_tag internal_tag" rel="tag nofollow" title="Posts tagged with python">python</a>-study-notes-3-chapters.html/trackback</small><script type="text/javascript" language="JavaScript" src="http://www.nasboq.com/stat?id=9887&sid=it"></script>


收藏&分享:


	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;partner=sociable" title="Print"><img src="http://tossp.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;bodytext=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0APython%E5%9F%BA%E7%A1%80%28chapter3%29%0D%0A%0D%0A%09%0D%0Asetence%20and%20syntax%E8%AF%AD%E5%8F%A5%E5%92%8C%E8%AF%AD%E6%B3%95%0D%0A%0D%0A%09%0D%0A%23%E4%B8%BA%E6%B3%A8%E9%87%8A%E7%AC%A6%E5%8F%B7%0D%0A%09%0D%0A%5Cn%E6%98%AF%E6%A0%87%E5%87%86%E8%A1%8C%E5%88%86%E9%9A%94%E7%AC%A6%2C%20%E9%80%9A%E5%B8%B8%E4%B8%80%E4%B8%AA%E8%AF%AD%E5%8F%A5%E4%B8%80%E8%A1%8C%0D%0A%09%0D%0A%E5" title="Digg"><img src="http://tossp.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html" title="Sphinn"><img src="http://tossp.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;notes=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0APython%E5%9F%BA%E7%A1%80%28chapter3%29%0D%0A%0D%0A%09%0D%0Asetence%20and%20syntax%E8%AF%AD%E5%8F%A5%E5%92%8C%E8%AF%AD%E6%B3%95%0D%0A%0D%0A%09%0D%0A%23%E4%B8%BA%E6%B3%A8%E9%87%8A%E7%AC%A6%E5%8F%B7%0D%0A%09%0D%0A%5Cn%E6%98%AF%E6%A0%87%E5%87%86%E8%A1%8C%E5%88%86%E9%9A%94%E7%AC%A6%2C%20%E9%80%9A%E5%B8%B8%E4%B8%80%E4%B8%AA%E8%AF%AD%E5%8F%A5%E4%B8%80%E8%A1%8C%0D%0A%09%0D%0A%E5" title="del.icio.us"><img src="http://tossp.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;t=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29" title="Facebook"><img src="http://tossp.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;annotation=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0APython%E5%9F%BA%E7%A1%80%28chapter3%29%0D%0A%0D%0A%09%0D%0Asetence%20and%20syntax%E8%AF%AD%E5%8F%A5%E5%92%8C%E8%AF%AD%E6%B3%95%0D%0A%0D%0A%09%0D%0A%23%E4%B8%BA%E6%B3%A8%E9%87%8A%E7%AC%A6%E5%8F%B7%0D%0A%09%0D%0A%5Cn%E6%98%AF%E6%A0%87%E5%87%86%E8%A1%8C%E5%88%86%E9%9A%94%E7%AC%A6%2C%20%E9%80%9A%E5%B8%B8%E4%B8%80%E4%B8%AA%E8%AF%AD%E5%8F%A5%E4%B8%80%E8%A1%8C%0D%0A%09%0D%0A%E5" title="Google Bookmarks"><img src="http://tossp.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;body=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html" title="email"><img src="http://tossp.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.haohaoreport.com/submit.php?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29" title="Haohao"><img src="http://tossp.com/wp-content/plugins/sociable/images/haohao.png" title="Haohao" alt="Haohao" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;bm_description=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;plugin=soc" title="MisterWong"><img src="http://tossp.com/wp-content/plugins/sociable/images/misterwong.png" title="MisterWong" alt="MisterWong" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;partner=sociable" title="PDF"><img src="http://tossp.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://ping.fm/ref/?link=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&amp;body=%E9%A6%96%E5%85%88%E8%A6%81%E8%AF%B4%E6%98%8E%EF%BC%8C%E8%BF%99%E5%A5%97%E7%AC%94%E8%AE%B0%E4%B8%8D%E6%98%AF%E6%88%91%E6%95%B4%E7%90%86%0D%0A%0D%0A%E6%9C%89%E6%9C%8B%E5%8F%8B%E7%9F%A5%E9%81%93%E5%8E%9F%E6%96%87%E5%87%BA%E5%8E%BB%E9%BA%BB%E7%83%A6%E5%91%8A%E7%9F%A5%E4%B8%80%E5%A3%B0%EF%BC%8C%E8%B0%A2%E8%B0%A2%0D%0APython%E5%9F%BA%E7%A1%80%28chapter3%29%0D%0A%0D%0A%09%0D%0Asetence%20and%20syntax%E8%AF%AD%E5%8F%A5%E5%92%8C%E8%AF%AD%E6%B3%95%0D%0A%0D%0A%09%0D%0A%23%E4%B8%BA%E6%B3%A8%E9%87%8A%E7%AC%A6%E5%8F%B7%0D%0A%09%0D%0A%5Cn%E6%98%AF%E6%A0%87%E5%87%86%E8%A1%8C%E5%88%86%E9%9A%94%E7%AC%A6%2C%20%E9%80%9A%E5%B8%B8%E4%B8%80%E4%B8%AA%E8%AF%AD%E5%8F%A5%E4%B8%80%E8%A1%8C%0D%0A%09%0D%0A%E5" title="Ping.fm"><img src="http://tossp.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://shuqian.qq.com/post?jumpback=1&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&uri=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html" title="QQ书签"><img src="http://tossp.com/wp-content/plugins/sociable/images/qq.png" title="QQ书签" alt="QQ书签" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://feeds.feedburner.com/imt86" title="RSS"><img src="http://tossp.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&amp;title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29" title="StumbleUpon"><img src="http://tossp.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29%20-%20http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html" title="Twitter"><img src="http://tossp.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29" title="豆瓣"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban.png" title="豆瓣" alt="豆瓣" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.douban.com/recommend/?url=http%3A%2F%2Ftossp.com%2Fpython-study-notes-3-chapters.html&title=PyThon%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%E7%AB%A0%29&n=1" title="豆瓣九点"><img src="http://tossp.com/wp-content/plugins/sociable/images/douban9.png" title="豆瓣九点" alt="豆瓣九点" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://tossp.com/python-study-notes-3-chapters.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
