<?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>Valdinei dos Santos &#187; zen</title>
	<atom:link href="http://www.valdineidossantos.com/tag/zen/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.valdineidossantos.com</link>
	<description>programação, sistemas operacionais e assuntos web</description>
	<lastBuildDate>Sat, 27 Feb 2010 20:09:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>O Zen do Python</title>
		<link>http://www.valdineidossantos.com/2009/08/zen-python/</link>
		<comments>http://www.valdineidossantos.com/2009/08/zen-python/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 14:06:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[curiosidades]]></category>
		<category><![CDATA[programação]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[zen]]></category>

		<guid isPermaLink="false">http://www.valdineidossantos.com/?p=70</guid>
		<description><![CDATA[O Python também contem seus ovos de páscoa, neste post descrevo o Zen do python que basicamente é uma receita que se seguida usando  a linguagem será muito bem sucedida. ]]></description>
			<content:encoded><![CDATA[<p>A alguns dias descobri uma coisa bem interessante no python.  Ao fazer o import dele mesmo ele mostra alguns principios que foram criados por  Tim Peters.</p>
<p>Seguindo a risca esses principios dificilmente seu projeto vai dar errado <img src='http://www.valdineidossantos.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Como os encontro?</p>
<p>Em sua linha de comando (estou assumindo que  você esta em algum Unix e que tenha python instalado) digite:</p>
<pre class="brush: bash">$ python</pre>
<p>Neste momento você estará entrando no shell interativo do python depois é só fazer o import.</p>
<pre class="brush: bash"> import this</pre>
<p>O resultado você visualiza abaixo</p>
<pre class="brush: python">Python 2.5.2 (r252:60911, Oct  5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!</pre>
<p>Vou colocar também uma livre tradução que encontrei na internet e que cito o autor abaixo.</p>
<pre class="brush: python">Bonito é melhor que feio.
Explícito é melhor que implícito.
Simples é melhor que complexo.
Complexo é melhor que complicado.
Plano é melhor que aninhado.
Esparso é melhor que denso.
Legibilidade conta.
Casos especiais não são especiais o bastante para se quebrar as regras.
Embora a simplicidade supere o purismo.
Erros nunca deveriam passar silenciosamente.
A menos que explicitamente silenciados.
Ao encarar a ambiguidade, recuse a tentação de adivinhar.
Deveria haver uma – e preferencialmente apenas uma – maneira óbvia de se fazer isto.
Embora aquela maneira possa não ser óbvia à primeira vista se você não for holandês.
Agora é melhor que nunca.
Embora nunca, seja muitas vezes melhor que pra já.
Se a implementação é difícil de explicar, é uma má idéia.
Se a implementação é fácil de explicar, pode ser uma boa idéia.
Namespaces são uma idéia estupenda – vamos fazer mais deles!</pre>
<p><a href="http://pipeless.blogspot.com/2008/09/o-zen-de-python.html" target="_blank"> fonte da tradução </a></p>
<p>Básicamente são boas maneiras para se trabalhar com python.</p>
<p>Algumas coisas que senti falta e que vou acrescer ao texto</p>
<pre class="brush: python">Marretas não são bem vindas, mas são necessárias.
O pior código é aquele que não existe, esse não dá dinheiro</pre>
<p>Bem acho que é isso que tinha a dizer hoje.</p>
<p>Fui &#8230;.</p>
<p>Fontes:</p>
<p><a title="http://www.python.org/dev/peps/pep-0020/" href="http://www.python.org/dev/peps/pep-0020/" target="_blank">http://www.python.org/dev/peps/pep-0020/</a></p>
<p><a title="http://pipeless.blogspot.com/2008/09/o-zen-de-python.html" href="http://pipeless.blogspot.com/2008/09/o-zen-de-python.html" target="_blank">http://pipeless.blogspot.com/2008/09/o-zen-de-python.html</a></p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "zen";
            bb_bid  = "135874";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_limit = "9";bb_format = "bbo";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->

<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://www.valdineidossantos.com/2009/08/zen-python/feed" rel="nofollow" class="external" title="Acompanhar comentários deste artigo?">Acompanhar comentários deste artigo?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python" rel="nofollow" class="external" title="Compartilhar nodel.icio.us">Compartilhar nodel.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python&amp;desc=O%20Python%20tamb%C3%A9m%20contem%20seus%20ovos%20de%20p%C3%A1scoa%2C%20neste%20post%20descrevo%20o%20Zen%20do%20python%20que%20basicamente%20%C3%A9%20uma%20receita%20que%20se%20seguida%20usando%20%20a%20linguagem%20ser%C3%A1%20muito%20bem%20sucedida.%20" rel="nofollow" class="external" title="Publicar noDiigo">Publicar noDiigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.valdineidossantos.com/2009/08/zen-python/&amp;t=O+Zen+do+Python" rel="nofollow" class="external" title="Compartilhar noFacebook">Compartilhar noFacebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-hotmail">
			<a href="http://mail.live.com/?rru=compose?subject=O+Zen+do+Python&amp;body=Link: http://www.valdineidossantos.com/2009/08/zen-python/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A O%20Python%20tamb%C3%A9m%20contem%20seus%20ovos%20de%20p%C3%A1scoa%2C%20neste%20post%20descrevo%20o%20Zen%20do%20python%20que%20basicamente%20%C3%A9%20uma%20receita%20que%20se%20seguida%20usando%20%20a%20linguagem%20ser%C3%A1%20muito%20bem%20sucedida.%20" rel="nofollow" class="external" title="Email this via Hotmail">Email this via Hotmail</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;bm_description=O+Zen+do+Python&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Adicionar aoMister Wong">Adicionar aoMister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python" rel="nofollow" class="external" title="Compartilhar noMixx">Compartilhar noMixx</a>
		</li>
		<li class="shr-orkut">
			<a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=O+Zen+do+Python&amp;du=http://www.valdineidossantos.com/2009/08/zen-python/&amp;cn=O%20Python%20tamb%C3%A9m%20contem%20seus%20ovos%20de%20p%C3%A1scoa%2C%20neste%20post%20descrevo%20o%20Zen%20do%20python%20que%20basicamente%20%C3%A9%20uma%20receita%20que%20se%20seguida%20usando%20%20a%20linguagem%20ser%C3%A1%20muito%20bem%20sucedida.%20" rel="nofollow" class="external" title="Promover noOrkut">Promover noOrkut</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python" rel="nofollow" class="external" title="Compartilhar noReddit">Compartilhar noReddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://www.valdineidossantos.com/2009/08/zen-python/&amp;title=O+Zen+do+Python" rel="nofollow" class="external" title="Encontrou algo bom? Compartilhe no StumbleUpon">Encontrou algo bom? Compartilhe no StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://www.valdineidossantos.com/2009/08/zen-python/" rel="nofollow" class="external" title="Compartilhar noTechnorati">Compartilhar noTechnorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=RT+%40valdineisantos%3A+O+Zen+do+Python+-+http://tr.im/v3Zz&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-yahoomail">
			<a href="http://compose.mail.yahoo.com/?Subject=O+Zen+do+Python&amp;body=Link: http://www.valdineidossantos.com/2009/08/zen-python/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A O%20Python%20tamb%C3%A9m%20contem%20seus%20ovos%20de%20p%C3%A1scoa%2C%20neste%20post%20descrevo%20o%20Zen%20do%20python%20que%20basicamente%20%C3%A9%20uma%20receita%20que%20se%20seguida%20usando%20%20a%20linguagem%20ser%C3%A1%20muito%20bem%20sucedida.%20" rel="nofollow" class="external" title="Email this via Yahoo! Mail">Email this via Yahoo! Mail</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.valdineidossantos.com/2009/08/zen-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
