Skip to content

Commit 9fd534b

Browse files
Travis build 504 pushed to Github Pages
1 parent 6e0f229 commit 9fd534b

File tree

467 files changed

+427
-1582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

467 files changed

+427
-1582
lines changed

5-django-apps-que-nao-vivo-se.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

5-django-apps-que-nao-vivo-se.html.gz

-30 Bytes
Binary file not shown.

a-armadilha-dos-argumentos-com-valores-padrao.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

aprendendo-e-ensinando-python.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

aprendendo-e-ensinando-python.html.gz

-33 Bytes
Binary file not shown.

archives.html

Lines changed: 1 addition & 10 deletions
Large diffs are not rendered by default.

archives.html.gz

-140 Bytes
Binary file not shown.

author/andre-ramos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/andre-ramos.html.gz

-35 Bytes
Binary file not shown.

author/arthur-alves.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/arthur-alves.html.gz

-33 Bytes
Binary file not shown.

author/artur-felipe-de-sousa.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/artur-felipe-de-sousa.html.gz

-30 Bytes
Binary file not shown.

author/bruno-cezar-rocha.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/bruno-cezar-rocha.html.gz

-33 Bytes
Binary file not shown.

author/capi-etheriel.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/capi-etheriel.html.gz

-31 Bytes
Binary file not shown.

author/diego-garcia.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/diego-garcia.html.gz

-29 Bytes
Binary file not shown.

author/dyesten-paulon.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/dyesten-paulon.html.gz

-30 Bytes
Binary file not shown.

author/eduardo-klosowski.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eduardo-klosowski.html.gz

-30 Bytes
Binary file not shown.

author/eduardo-matos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eduardo-matos.html.gz

-31 Bytes
Binary file not shown.

author/elias-dorneles.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/elias-dorneles.html.gz

-26 Bytes
Binary file not shown.

author/elio-duarte.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/elio-duarte.html.gz

-30 Bytes
Binary file not shown.

author/eric-hideki.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/eric-hideki.html.gz

-29 Bytes
Binary file not shown.

author/erick-muller.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/erick-muller.html.gz

-33 Bytes
Binary file not shown.

author/evaldo-junior-bento.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/evaldo-junior-bento.html.gz

-32 Bytes
Binary file not shown.

author/fabiano-goes.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/fabiano-goes.html.gz

-31 Bytes
Binary file not shown.

author/fabio-c-barrionuevo-da-luz.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-29 Bytes
Binary file not shown.

author/gildasio-junior.html

Lines changed: 0 additions & 202 deletions
This file was deleted.

author/gildasio-junior.html.gz

-5.27 KB
Binary file not shown.

author/gilmar-soares.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/gilmar-soares.html.gz

-31 Bytes
Binary file not shown.

author/guido-luz-percu.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/guido-luz-percu.html.gz

-30 Bytes
Binary file not shown.

author/guilherme-louro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/guilherme-louro.html.gz

-31 Bytes
Binary file not shown.

author/hudson-brendon.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/hudson-brendon.html.gz

-31 Bytes
Binary file not shown.

author/igor-santos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/igor-santos.html.gz

-30 Bytes
Binary file not shown.

author/lucas-magnum.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/lucas-magnum.html.gz

-31 Bytes
Binary file not shown.

author/luciano-ramalho.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/luciano-ramalho.html.gz

-29 Bytes
Binary file not shown.

author/mario-chaves.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/mario-chaves.html.gz

-31 Bytes
Binary file not shown.

author/matheus-ap-godoy-ribeiro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-29 Bytes
Binary file not shown.

author/mauricio-camargo-sipmann.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-30 Bytes
Binary file not shown.

author/raphael-passini-diniz.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/raphael-passini-diniz.html.gz

-31 Bytes
Binary file not shown.

author/raphael-passini.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/raphael-passini.html.gz

-29 Bytes
Binary file not shown.

author/regis-da-silva.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/regis-da-silva.html.gz

-32 Bytes
Binary file not shown.

author/regis-da-silva2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/regis-da-silva2.html.gz

-32 Bytes
Binary file not shown.

author/romulo-collopy.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/romulo-collopy.html.gz

-31 Bytes
Binary file not shown.

author/thiago-coroa.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

author/thiago-coroa.html.gz

-32 Bytes
Binary file not shown.

authors.html

Lines changed: 1 addition & 2 deletions
Large diffs are not rendered by default.

authors.html.gz

-51 Bytes
Binary file not shown.

bottle-framework-full-stack-sem-django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-33 Bytes
Binary file not shown.

categories.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

categories.html.gz

-36 Bytes
Binary file not shown.

category/anti-patterns.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/anti-patterns.html.gz

-31 Bytes
Binary file not shown.

category/banco-de-dados.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/banco-de-dados.html.gz

-30 Bytes
Binary file not shown.

category/begginers-bottle-tutorial.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-31 Bytes
Binary file not shown.

category/debugging.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/debugging.html.gz

-29 Bytes
Binary file not shown.

category/deploy-infraestrutura.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-30 Bytes
Binary file not shown.

category/django-apps.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django-apps.html.gz

-28 Bytes
Binary file not shown.

category/django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django.html.gz

-27 Bytes
Binary file not shown.

category/django2.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/django2.html.gz

-30 Bytes
Binary file not shown.

category/flask.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/flask.html.gz

-32 Bytes
Binary file not shown.

category/google-app-engine.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/google-app-engine.html.gz

-30 Bytes
Binary file not shown.

category/heroku.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/heroku.html.gz

-32 Bytes
Binary file not shown.

category/load-testing.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/load-testing.html.gz

-30 Bytes
Binary file not shown.

category/manipulacao-de-imagens.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-35 Bytes
Binary file not shown.

category/misc.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/misc.html.gz

-27 Bytes
Binary file not shown.

category/pelican.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/pelican.html.gz

-32 Bytes
Binary file not shown.

category/python-banco-de-dados.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-31 Bytes
Binary file not shown.

category/python-django-rest.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-django-rest.html.gz

-31 Bytes
Binary file not shown.

category/python-django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-django.html.gz

-30 Bytes
Binary file not shown.

category/python-por-dentro.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/python-por-dentro.html.gz

-31 Bytes
Binary file not shown.

category/python.html

Lines changed: 32 additions & 21 deletions
Large diffs are not rendered by default.

category/python.html.gz

-76 Bytes
Binary file not shown.

category/python2.html

Lines changed: 1 addition & 32 deletions
Large diffs are not rendered by default.

category/python2.html.gz

-240 Bytes
Binary file not shown.

category/pythonentrevistas.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/pythonentrevistas.html.gz

-28 Bytes
Binary file not shown.

category/servidor-web.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/servidor-web.html.gz

-33 Bytes
Binary file not shown.

category/tutoriais.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

category/tutoriais.html.gz

-31 Bytes
Binary file not shown.

class-based-views-django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

class-based-views-django.html.gz

-27 Bytes
Binary file not shown.

como-fazer-fork-clone-push-pull-request-no-github.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

como_colaborar_com_projetos_open_source.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-28 Bytes
Binary file not shown.

configurando-ambiente-django-com-apache-e-mod-wsgi.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

configurando-um-servidor-de-producao-para-aplicacoes-python.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

conteinerizando-suas-aplicacoes-django-com-docker-e-fig.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

criando-sites-estaticos-com-pelican.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-26 Bytes
Binary file not shown.

criar-site-com-form-lista-30-min.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-29 Bytes
Binary file not shown.

debugging-em-python-sem-ide.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

debugging-em-python-sem-ide.html.gz

-29 Bytes
Binary file not shown.

deploy-app-django-openshift.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

deploy-app-django-openshift.html.gz

-28 Bytes
Binary file not shown.

deploy-com-django-fagungis.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

deploy-com-django-fagungis.html.gz

-27 Bytes
Binary file not shown.

desenvolvendo-com-bottle-parte-1.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-31 Bytes
Binary file not shown.

desenvolvendo-para-google-app-engine-com-tekton.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Binary file not shown.

diferenca-operadores.html.gz

-6.95 KB
Binary file not shown.

django-introducao-queries.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

django-introducao-queries.html.gz

-29 Bytes
Binary file not shown.

django-na-pratica-aula-01.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

django-na-pratica-aula-01.html.gz

-31 Bytes
Binary file not shown.

django-overview-10-minutos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

django-overview-10-minutos.html.gz

-31 Bytes
Binary file not shown.

django-rest-framework-quickstart.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-34 Bytes
Binary file not shown.

diferenca-operadores.html renamed to drafts/diferenca-operadores.html

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

drafts/diferenca-operadores.html.gz

6.95 KB
Binary file not shown.

editando-o-admin-do-django.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

editando-o-admin-do-django.html.gz

-31 Bytes
Binary file not shown.

entrevista-henrique-bastos.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

entrevista-henrique-bastos.html.gz

-36 Bytes
Binary file not shown.

extraindo-texto-de-imagens-com-python.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
-36 Bytes
Binary file not shown.

feeds/all.atom.xml

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>PythonClub</title><link href="http://pythonclub.com.br/" rel="alternate"></link><link href="http://pythonclub.com.br/feeds/all.atom.xml" rel="self"></link><id>http://pythonclub.com.br/</id><updated>2015-11-27T14:00:00-02:00</updated><entry><title>Diferença entre == e is</title><link href="http://pythonclub.com.br/diferenca-operadores.html" rel="alternate"></link><updated>2015-11-27T14:00:00-02:00</updated><author><name>Gildásio Júnior</name></author><id>tag:pythonclub.com.br,2015-11-27:diferenca-operadores.html</id><summary type="html">&lt;h2&gt;Diferença entre == e is&lt;/h2&gt;
3-
&lt;p&gt;Olá, galera, tudo tranquilo?&lt;/p&gt;
4-
&lt;p&gt;Estava conversando com um amigo que está estudando python e tudo mais, e então ele veio com a seguinte dúvida:&lt;/p&gt;
5-
&lt;blockquote&gt;
6-
&lt;p&gt;Qual a diferença entre == e is no python?&lt;/p&gt;
7-
&lt;/blockquote&gt;
8-
&lt;p&gt;Para quem não sabe, no python tem o operador &lt;em&gt;is&lt;/em&gt; que "tem a mesma função do &lt;em&gt;==&lt;/em&gt;. Veja:&lt;/p&gt;
9-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
10-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
11-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
12-
&lt;span class="bp"&gt;True&lt;/span&gt;
13-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
14-
&lt;span class="bp"&gt;True&lt;/span&gt;
15-
&lt;/pre&gt;&lt;/div&gt;
16-
17-
18-
&lt;p&gt;Mas...&lt;/p&gt;
19-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
20-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
21-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
22-
&lt;span class="bp"&gt;True&lt;/span&gt;
23-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
24-
&lt;span class="bp"&gt;False&lt;/span&gt;
25-
&lt;/pre&gt;&lt;/div&gt;
26-
27-
28-
&lt;p&gt;Viu só? Pois bem, o que que acontece então??&lt;/p&gt;
29-
&lt;p&gt;O python tem um mecanismo interessante nesse ponto... Quando se tratam de &lt;em&gt;coisas pequenas&lt;/em&gt; ele utiliza de ponteiros para apontar outros rótulos para um mesmo endereço de memória. Quando o que é armazenado na variável já começa a crescer, fica maior e tal, ele já não usa disso, para não pesar, mas sim de outro endereço ...&lt;/p&gt;
30-
&lt;p&gt;Seria um cache que ele faz de alguns tipos de objetos, entre eles estão int e string, por exemplo. Float e dicionário já não são assim.&lt;/p&gt;
31-
&lt;p&gt;Para ter uma ideia melhor disso, vamos ver os endereços que as variáveis ocupam e o resultado da comparação:&lt;/p&gt;
32-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
33-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
34-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
35-
&lt;span class="s"&gt;&amp;#39;0x98a1844&amp;#39;&lt;/span&gt;
36-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
37-
&lt;span class="s"&gt;&amp;#39;0x98a1844&amp;#39;&lt;/span&gt;
38-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
39-
&lt;span class="bp"&gt;True&lt;/span&gt;
40-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
41-
&lt;span class="bp"&gt;True&lt;/span&gt;
42-
&lt;/pre&gt;&lt;/div&gt;
43-
44-
45-
&lt;p&gt;Perceba que ele pega o mesmo endereço ... Agora, se colocarmos valores maiores:&lt;/p&gt;
46-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
47-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
48-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
49-
&lt;span class="s"&gt;&amp;#39;0x98e5520&amp;#39;&lt;/span&gt;
50-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
51-
&lt;span class="s"&gt;&amp;#39;0x98e5508&amp;#39;&lt;/span&gt;
52-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
53-
&lt;span class="bp"&gt;True&lt;/span&gt;
54-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
55-
&lt;span class="bp"&gt;False&lt;/span&gt;
56-
&lt;/pre&gt;&lt;/div&gt;
57-
58-
59-
&lt;p&gt;Ou seja, o &lt;em&gt;is&lt;/em&gt; (como a tradução mostra) vai verificar se algo é aquilo a que a comparação está se referindo, ou seja, se são a mesma coisa. Já o &lt;em&gt;==&lt;/em&gt; vai analisar se são iguais, assim como o esperado.&lt;/p&gt;
60-
&lt;p&gt;Mais algumas demonstrações:&lt;/p&gt;
61-
&lt;ul&gt;
62-
&lt;li&gt;Float:&lt;/li&gt;
63-
&lt;/ul&gt;
64-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;
65-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;
66-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
67-
&lt;span class="bp"&gt;True&lt;/span&gt;
68-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
69-
&lt;span class="bp"&gt;False&lt;/span&gt;
70-
&lt;/pre&gt;&lt;/div&gt;
71-
72-
73-
&lt;ul&gt;
74-
&lt;li&gt;Dict:&lt;/li&gt;
75-
&lt;/ul&gt;
76-
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
77-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
78-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
79-
&lt;span class="bp"&gt;True&lt;/span&gt;
80-
&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;
81-
&lt;span class="bp"&gt;False&lt;/span&gt;
82-
&lt;/pre&gt;&lt;/div&gt;
83-
84-
85-
&lt;blockquote&gt;
86-
&lt;p&gt;Não há motivo para me aprofundar tanto aqui, é apenas uma dica rápida. Espero que resolva os problemas de dúvidas de quem necessitar ... Tem mais algum caso como esse? Quer tirar alguma dúvida do tipo? Comenta ai ou entra em contato (olha no topo da página).&lt;/p&gt;
87-
&lt;/blockquote&gt;
88-
&lt;p&gt;Vlw pessoal, até mais ver!!&lt;/p&gt;
89-
&lt;blockquote&gt;
90-
&lt;p&gt;Texto originalmente postado aqui: &lt;a href="https://gjuniioor.github.io/blog/python-diferenca-operadores/"&gt;https://gjuniioor.github.io/blog/python-diferenca-operadores/&lt;/a&gt;.&lt;/p&gt;
91-
&lt;/blockquote&gt;</summary><category term="python"></category><category term="dica"></category><category term="operadores"></category></entry><entry><title>Extraindo Texto de Imagens com Python</title><link href="http://pythonclub.com.br/extraindo-texto-de-imagens-com-python.html" rel="alternate"></link><updated>2015-11-22T17:00:00-02:00</updated><author><name>André Ramos</name></author><id>tag:pythonclub.com.br,2015-11-22:extraindo-texto-de-imagens-com-python.html</id><summary type="html">&lt;h2&gt;Introdução&lt;/h2&gt;
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>PythonClub</title><link href="http://pythonclub.com.br/" rel="alternate"></link><link href="http://pythonclub.com.br/feeds/all.atom.xml" rel="self"></link><id>http://pythonclub.com.br/</id><updated>2015-11-22T17:00:00-02:00</updated><entry><title>Extraindo Texto de Imagens com Python</title><link href="http://pythonclub.com.br/extraindo-texto-de-imagens-com-python.html" rel="alternate"></link><updated>2015-11-22T17:00:00-02:00</updated><author><name>André Ramos</name></author><id>tag:pythonclub.com.br,2015-11-22:extraindo-texto-de-imagens-com-python.html</id><summary type="html">&lt;h2&gt;Introdução&lt;/h2&gt;
923
&lt;p&gt;Já precisou extrair texto de imagens mas não sabia como? aprenda como fazer isso com apenas 3 linhas de código (Por isso amo python!). Antes de começarmos, vamos ver um pouco de teoria.&lt;/p&gt;
934
&lt;h3&gt;O que é OCR?&lt;/h3&gt;
945
&lt;p&gt;Segundo o Wikipedia, OCR é um acrónimo para o inglês Optical Character Recognition, é uma tecnologia para reconhecer caracteres a partir de um arquivo de imagem ou mapa de bits sejam eles escaneados, escritos a mão, datilografados ou impressos. Dessa forma, através do OCR é possível obter um arquivo de texto editável por um computador. A engine OCR que vamos utilizar é a &lt;strong&gt;Tesseract&lt;/strong&gt;, a mesma foi inicialmente desenvolvida nos laboratórios da HP e tem seu projeto hospedado em: &lt;a href="https://github.com/tesseract-ocr/tesseract"&gt;https://github.com/tesseract-ocr/tesseract&lt;/a&gt;. Texto adaptado de: &lt;a href="https://pt.wikipedia.org/wiki/Reconhecimento_%C3%B3tico_de_caracteres"&gt;https://pt.wikipedia.org/wiki/Reconhecimento_ótico_de_caracteres&lt;/a&gt;&lt;/p&gt;

feeds/all.atom.xml.gz

-1.13 KB
Binary file not shown.

0 commit comments

Comments
 (0)