<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-19840256</id><updated>2025-07-26T21:06:36.929+01:00</updated><category term="chorradas"/><category term="música"/><category term="python"/><category term="cine"/><category term="blogsYgofio"/><category term="buena vida"/><category term="comics"/><category term="televisión"/><category term="blogger"/><category term="friki"/><category term="fotos"/><category term="google"/><category term="paridas"/><category term="pincho tortilla"/><category term="publicidad"/><category term="carteles"/><category term="Religiones y otras enfermedades mentales"/><category term="citas"/><category term="paridas vacacionales"/><category term="py3k"/><category term="burocracia"/><category term="conspiranoia"/><category term="escepticismo"/><category term="humor"/><category term="300"/><category term="doraemon"/><category term="absurdo"/><category term="cerveza"/><category term="libros"/><category term="programación"/><category term="rollo viral"/><category term="software"/><category term="ubuntu"/><category term="Internet"/><category term="batallitas"/><category term="historia"/><category term="juegos"/><category term="Google Maps"/><category term="boncho"/><category term="El Monstruo del Sebadal"/><category term="elecciones"/><category term="nuevas tecnologías"/><category term="congreso"/><category term="jodía informática"/><category term="video"/><category term="canarias"/><category term="corto"/><category term="desarrollo"/><category term="diseño gráfico"/><category term="django"/><category term="google earth"/><category term="linux"/><category term="series"/><category term="starwars"/><category term="Big Culo Day"/><category term="emds"/><category term="innovación"/><category term="pintura"/><category term="símbolos"/><category term="tenerife"/><category term="API"/><category term="YouTube"/><category term="cada vez más cabreado"/><category term="estrellas"/><category term="icities"/><category term="malaprensa"/><category term="TLP"/><category term="agarrate los machos"/><category term="anarroseo"/><category term="arquelogía informática"/><category term="caña"/><category term="definiciones"/><category term="garimba"/><category term="heroes"/><category term="meme"/><category term="mieditos"/><category term="política"/><category term="seguridad"/><category term="supervillanos"/><category term="watchmen"/><category term="web"/><category term="Daraemon"/><category term="DesCon2"/><category term="Google Developers Day"/><category term="amigos"/><category term="camiseta"/><category term="censura"/><category term="charlas"/><category term="división de poderes"/><category term="fotos ebrias"/><category term="gofio"/><category term="libertades"/><category term="machangadas"/><category term="ojobuscador"/><category term="planetas"/><category term="plurk"/><category term="prensa"/><category term="recursos útiles"/><category term="reseña"/><category term="seo"/><category term="tv"/><category term="velociraptor"/><category term="vendemotos"/><category term="viajes"/><category term="wikileaks"/><category term="wtf"/><category term="zasca"/><category term="El Supositorio"/><category term="MarcaEspaña"/><category term="XXX"/><category term="accesibilidad"/><category term="ateísmo"/><category term="canarisms"/><category term="casque"/><category term="chuleo"/><category term="chuleta"/><category term="coche"/><category term="databases"/><category term="deviantart"/><category term="empresas"/><category term="envidia cochina"/><category term="gadget"/><category term="imprescindible"/><category term="imágenes"/><category term="marvel"/><category term="propaganda linux"/><category term="pyBirras"/><category term="romería"/><category term="sistemas operativos"/><category term="supervivencia"/><category term="taller"/><category term="tdc"/><category term="trucos"/><category term="unix"/><category term="windows"/><category term="15m"/><category term="2012"/><category term="2013"/><category term="Ay oma que rica"/><category term="DSL"/><category term="abreviaturas"/><category term="animación"/><category term="arte"/><category term="automeme"/><category term="cablegate"/><category term="ciencia"/><category term="colegas"/><category term="cultura"/><category term="dc"/><category term="dinero"/><category term="dinosaurio"/><category term="discurso"/><category term="ecologismo"/><category term="euribor"/><category term="exposición"/><category term="fútbol"/><category term="gps"/><category term="greader"/><category term="hacklab"/><category term="incendio"/><category term="la palma"/><category term="ligarto"/><category term="mashup"/><category term="matemáticas"/><category term="music"/><category term="móviles"/><category term="navidad"/><category term="palante"/><category term="porno"/><category term="profesionales"/><category term="robot"/><category term="shield"/><category term="teaser"/><category term="terror feed"/><category term="traductor"/><category term="transparencias"/><category term="tutorial"/><category term="ull"/><category term="webmaster"/><category term="wii"/><category term="#hqj"/><category term="2014"/><category term="2017"/><category term="2D"/><category term="30rock"/><category term="Appy/POD"/><category term="Coulson-está-vivo-Furia-mintió"/><category term="EBE09"/><category term="El Escarabajo Verde"/><category term="ElAnden"/><category term="Guerras y otras enfermedades mundiales"/><category term="LNDLMV"/><category term="LipDub"/><category term="PyDay"/><category term="QR"/><category term="Red Neutral"/><category term="SWTenerife"/><category term="StackOverflow"/><category term="Start UP"/><category term="The Blues Brothers"/><category term="UML"/><category term="VNC"/><category term="agile"/><category term="ak-47"/><category term="aparcamiento"/><category term="armas"/><category term="auditorio"/><category term="bbc"/><category term="bcndevcon"/><category term="buscatarareos"/><category term="capullos"/><category term="cartoon"/><category term="casting"/><category term="cata"/><category term="chavo"/><category term="chorrads"/><category term="clientes"/><category term="colas"/><category term="concurso"/><category term="coop"/><category term="coñazo"/><category term="css"/><category term="derechos de imagen"/><category term="dia del padre"/><category term="drones"/><category term="eelt"/><category term="english"/><category term="eoe"/><category term="espías"/><category term="fabric"/><category term="feedly"/><category term="flash"/><category term="fotografía"/><category term="fotozum"/><category term="fotógrafos"/><category term="frases lapidaria"/><category term="fulbol"/><category term="fundamentos web"/><category term="galactica"/><category term="geografía"/><category term="globos"/><category term="google chrome"/><category term="homeopatía"/><category term="howto"/><category term="htc"/><category term="html"/><category term="husos horarios"/><category term="inglés"/><category term="intro"/><category term="ipod"/><category term="java"/><category term="javascript"/><category term="kanban"/><category term="katana"/><category term="lluvia"/><category term="londrs"/><category term="lotr"/><category term="madmen"/><category term="malahostia"/><category term="microformatos"/><category term="monotremas"/><category term="muelte"/><category term="obus"/><category term="ocio"/><category term="ong"/><category term="pastafari"/><category term="pc"/><category term="pesca"/><category term="pincho"/><category term="plugins"/><category term="post patrocinado"/><category term="poster"/><category term="puerto rican rock"/><category term="pulp"/><category term="pygments"/><category term="quadcopter"/><category term="radio"/><category term="regreso al futuro"/><category term="relato"/><category term="respeto"/><category term="retro"/><category term="revistas"/><category term="rolling stones"/><category term="rones"/><category term="récord"/><category term="salud"/><category term="saturnalias"/><category term="servicios"/><category term="siglas"/><category term="simpsons"/><category term="sketchup"/><category term="sms"/><category term="spectrum"/><category term="speed painting"/><category term="sun"/><category term="teléfonos"/><category term="terremotos"/><category term="tipografía"/><category term="toolbox"/><category term="tortilla"/><category term="tranviatas versus guagüeros"/><category term="tributo"/><category term="tuenti"/><category term="turismo"/><category term="tópicos"/><category term="universidad"/><category term="vax"/><category term="veredita view"/><category term="vhs"/><category term="walkman"/><category term="western"/><category term="xenófobos"/><category term="xml-zombie"/><title type='text'>El Ornitorrinco Enmascarado</title><subtitle type='html'>¡Allí! ¡En el cielo! ¿Es un pájaro!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>767</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19840256.post-7699061200140059884</id><published>2023-04-29T13:20:00.003+01:00</published><updated>2023-04-29T13:46:31.814+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Django: Actualizar un contador en un modelo</title><content type='html'>&lt;h2&gt;Actualizar un contador en un modelo en Django&lt;/h2&gt;

&lt;p&gt;A veces necesitamos realizar algún tipo de operación aritmética sencilla en el modelo, y queremos que persista en la base de datos. Un ejemplo común es un contador, que queremos incrementar o decrementar en determinadas circunstancias.&lt;/p&gt;

&lt;p&gt;Una solución sencilla sería hacerlo directamente en Python, algo como esto:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;
product = Item.objects.get(pk=4523)
product.stock += 1
product.save()
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Funciona perfecto, pero tiene dos problemas: Uno es una posible &lt;a href=&quot;https://es.wikipedia.org/wiki/Condición_de_carrera&quot;&gt;condición de carrera&lt;/a&gt;, si tenemos la mala suerte de que otro proceso está cambiando el valor del contador &lt;code&gt;stock&lt;/code&gt; justo durante el intervalo entre que hemos leído los datos de la base de datos y el momento es que volvemos a salvarlos.&lt;/p&gt;

&lt;p&gt;El segundo problema es otro aspecto del mismo, estamos haciendo dos consultas a la base de datos, una para obtener el valor antiguo y otra para guardar el valor nuevo.&lt;/p&gt;

&lt;p&gt;Podemos resolver ambos problemas (Ya que los dos tienen la misma base) con un único paso, que realizará de &lt;a href=&quot;https://es.wikipedia.org/wiki/Atomicidad&quot;&gt;forma atómica la propia base de datos&lt;/a&gt;, usando lo que Django llama &lt;b&gt;&lt;a href=&quot;https://docs.djangoproject.com/en/4.2/ref/models/expressions/&quot;&gt;expresiones F&lt;/a&gt;&lt;/b&gt;. Las expresiones F nos permiten realizar una actualización de un campo con valores &lt;i&gt;relativos&lt;/i&gt; otros campos de la tabla.&lt;/p&gt;

&lt;p&gt;Para el ejemplo anterior, la solución mejorada podría ser:&lt;/p&gt;
  
&lt;blockquote&gt;&lt;pre&gt;
from django.db.models import F

product = Item.objects.get(pk=4523)
Item.stock = F(&quot;stock”) + 1
product.save(update_fields=[&#39;stock&#39;])
&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;El resultado sería una única interacción con la base de datos, que ejecutaría un código SQL similar al siguiente :

&lt;blockquote&gt;&lt;pre&gt;
UPDATE Item
   SET stock = stock + 1
 WHERE id = 4523;
&lt;/pre&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/7699061200140059884/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/7699061200140059884' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7699061200140059884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7699061200140059884'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2023/04/django-actualizar-un-contador-en-un.html' title='Django: Actualizar un contador en un modelo'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-1787580553195474820</id><published>2020-10-15T00:16:00.002+01:00</published><updated>2020-10-15T00:16:40.688+01:00</updated><title type='text'>The return of the Masked Platyplus</title><content type='html'>Dos añitos sin publicar nada... Igual debería retomar esto</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/1787580553195474820/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/1787580553195474820' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/1787580553195474820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/1787580553195474820'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2020/10/the-return-of-masked-platyplus.html' title='The return of the Masked Platyplus'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-4577151912585661523</id><published>2018-04-25T11:17:00.001+01:00</published><updated>2018-04-25T11:17:35.593+01:00</updated><title type='text'>Cristina Cifuentes roba en un supermercado, ahora con banda sonora</title><content type='html'>&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/J7a5Z0OMIwE&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/4577151912585661523/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/4577151912585661523' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4577151912585661523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4577151912585661523'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2018/04/cristina-cifuentes-roba-en-un.html' title='Cristina Cifuentes roba en un supermercado, ahora con banda sonora'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/J7a5Z0OMIwE/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-5302483659914643583</id><published>2018-03-19T09:48:00.000+00:00</published><updated>2018-03-19T09:54:00.414+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="howto"/><category scheme="http://www.blogger.com/atom/ns#" term="py3k"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Cómo determinar si un archivo es una imagen PNG</title><content type='html'>&lt;p&gt;Los primeros 8 bytes de un fichero PNG son siempre los mismos. En decimal, serían:&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;    137 80 78 71 13 10 26 10
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;p&gt;Para poder examinar esos 8 bits en linux/unix, podemos usar la utilidad &lt;code&gt;head&lt;/code&gt;, y con &lt;code&gt;hexdump&lt;/code&gt; podemos verlos
en hexadecimal&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;    head --bytes=8 ejemplo.jpg | hexdump -C
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;p&gt;El resultado debería ser:&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;00000000  89 50 4e 47 0d 0a 1a 0a                           |.PNG....|
00000008
&lt;/code&gt;&lt;/pre&gt;
&lt;br&gt;
&lt;h3&gt;Buscar archivos PNG con otra extensión&lt;/h3&gt;
&lt;br&gt;
&lt;p&gt;El siguiente codigo en Python 3 localiza archivos de tipo &lt;code&gt;PNG&lt;/code&gt; sin extensión o
con una extensión que no sería la correcta:&lt;/p&gt;
&lt;br&gt;
&lt;pre&gt;&lt;code&gt;    import os
    PNG_SIGNATURE = b&#39;\x89\x50\x4e\x47\x0d\x0a\x1a\x0a&#39;

    for (path, dirnames,filenames) in os.walk(&#39;/home/jileon&#39;):
        for filename in filenames:
            full_name = os.path.join(path, filename)
            if os.access(full_name, os.R_OK):
                with open(full_name, &#39;rb&#39;) as f:
                    head = f.read(8)
                    if head == PNG_SIGNATURE:
                        if not full_name.lower().endswith(&#39;.png&#39;):
                            print(full_name)
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/5302483659914643583/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/5302483659914643583' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/5302483659914643583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/5302483659914643583'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2018/03/como-determinar-si-un-archivo-es-una.html' title='Cómo determinar si un archivo es una imagen PNG'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Camino del Medio, 77, 38296 San Cristóbal de La Laguna, Santa Cruz de Tenerife, España</georss:featurename><georss:point>28.478348692223161 -16.32568359375</georss:point><georss:box>27.585463192223163 -17.61657709375 29.371234192223159 -15.03479009375</georss:box></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-2091625048980265877</id><published>2017-08-30T12:58:00.000+01:00</published><updated>2017-08-30T12:58:01.858+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="API"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="programación"/><category scheme="http://www.blogger.com/atom/ns#" term="py3k"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Uso del decorador functools.wraps en Python</title><content type='html'>&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Supongamos una función muy sencilla, pero correctamente comentada:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&#39;&#39;&#39;Esta función acepta dos parámetros, y devuelve la suma de ellos.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    Ejemplo:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; result = suma(2, 4)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; assert result == 6&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &#39;&#39;&#39;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;
    
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Vemos que funciona perfectamente:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;390&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_text output_subarea output_execute_result&quot;&gt;
&lt;pre&gt;392&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Si pedimos información de la función con &lt;code&gt;help&lt;/code&gt;, nos da la documentación que incluimos como &lt;a href=&quot;https://en.wikipedia.org/wiki/Docstring&quot;&gt;&lt;em&gt;docstring&lt;/em&gt;&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_subarea output_stream output_stdout output_text&quot;&gt;
&lt;pre&gt;Help on function suma in module __main__:

suma(a, b)
    Esta función acepta dos parámetros, y devuelve la suma de ellos.
    
    Ejemplo:
    
    &amp;gt;&amp;gt;&amp;gt; result = suma(2, 4)
    &amp;gt;&amp;gt;&amp;gt; assert result == 6

&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Vamos ahora a decorarla con un decorador muy sencillo,
simplemente escribe a consola cuando llamamos a la función y, después de
 ejecutarla, imprime también el resultado:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;wrapper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;Llamando a la función: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;Resultado: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;wrapper&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@log&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&#39;&#39;&#39;Esta función acepta dos parámetros, y devuelve la suma de ellos.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    Ejemplo:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; result = suma(2, 4)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; assert result == 6&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &#39;&#39;&#39;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Vemos que el decorador funciona correctamente:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_subarea output_stream output_stdout output_text&quot;&gt;
&lt;pre&gt;Llamando a la función: suma
Resultado: 5
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_text output_subarea output_execute_result&quot;&gt;
&lt;pre&gt;5&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
El problema es que la nueva función &lt;code&gt;suma&lt;/code&gt; ha perdido todo los metadatos de la función original, entre ellos la documentación:&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_subarea output_stream output_stdout output_text&quot;&gt;
&lt;pre&gt;Help on function wrapper in module __main__:

wrapper(*args, **kwargs)

&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_text output_subarea output_execute_result&quot;&gt;
&lt;pre&gt;&#39;wrapper&#39;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
&lt;a href=&quot;https://docs.python.org/3/library/functools.html#functools.wraps&quot;&gt;El decorador &lt;code&gt;wraps&lt;/code&gt; del módulo &lt;code&gt;functools&lt;/code&gt;&lt;/a&gt; lo 
que hace es resolver este problema, inyectando en la función decorada 
todos los metadatos de la función original, entre ellos la &lt;em&gt;docstring&lt;/em&gt; (Por eso necesita como parámetro la función original).&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;functools&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    
    &lt;span class=&quot;nd&quot;&gt;@functools&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;wraps&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;wrapper&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;Llamando a la función: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;vm&quot;&gt;__name__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;functor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;Resultado: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;{}&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;wrapper&lt;/span&gt;

&lt;span class=&quot;nd&quot;&gt;@log&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&#39;&#39;&#39;Esta función acepta dos parámetros, y devuelve la suma de ellos.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    Ejemplo:&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; result = suma(2, 4)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;gt;&amp;gt;&amp;gt; assert result == 6&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &#39;&#39;&#39;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Vemos que todo sigue funcionando igual...&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_subarea output_stream output_stdout output_text&quot;&gt;
&lt;pre&gt;Llamando a la función: suma
Resultado: 5
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;
&lt;div class=&quot;output_area&quot;&gt;
&lt;div class=&quot;output_text output_subarea output_execute_result&quot;&gt;
&lt;pre&gt;5&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot;&gt;
Pero la función &lt;code&gt;help&lt;/code&gt; muestra la documentación de la función original...&lt;br /&gt;
&lt;br /&gt;


&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell border-box-sizing code_cell rendered&quot;&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;input&quot;&gt;
&lt;div class=&quot;inner_cell&quot;&gt;
    &lt;div class=&quot;input_area&quot;&gt;
&lt;div class=&quot; highlight hl-ipython3&quot;&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;suma&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot;&gt;
&lt;div class=&quot;output&quot;&gt;


&lt;div class=&quot;output_area&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_stream output_stdout output_text&quot;&gt;
&lt;pre&gt;Help on function suma in module __main__:

suma(a, b)
    Esta función acepta dos parámetros, y devuelve la suma de ellos.
    
    Ejemplo:
    
    &amp;gt;&amp;gt;&amp;gt; result = suma(2, 4)
    &amp;gt;&amp;gt;&amp;gt; assert result == 6&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;Escrito en colaboración con Enrique Cordobés Faura.&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/2091625048980265877/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/2091625048980265877' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/2091625048980265877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/2091625048980265877'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2017/08/uso-del-decorador-functoolswraps-en.html' title='Uso del decorador functools.wraps en Python'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-1899099927166426798</id><published>2017-08-09T11:46:00.000+01:00</published><updated>2017-08-09T13:41:46.591+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DSL"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Ejemplo de uso de pyparsing</title><content type='html'>&lt;div class=&quot;cell border-box-sizing text_cell rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background-color: white; border: 1px solid transparent; box-sizing: border-box; display: flex; flex-direction: row; margin: 0px; outline: none; padding: 0px; width: 928px;&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; display: flex; flex-direction: column; flex: 1 1 0%; margin: 0px; padding: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render border-box-sizing rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; margin: 0px; outline: none; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot;&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
Nota: La versión más actualizada de este documento está siempre en&lt;/h2&gt;
&lt;h4&gt;
&lt;a href=&quot;https://github.com/euribates/Charla-DSL/blob/master/Ejemplo-uso-pyparsing.ipynb&quot;&gt;https://github.com/euribates/Charla-DSL/blob/master/Ejemplo-uso-pyparsing.ipynb&lt;/a&gt;&lt;/h4&gt;
&lt;h2 id=&quot;Ejemplo-de-uso-de-pyparsing&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 21.994px; font-weight: bold; line-height: 1; margin: 0.636em 0px 0px;&quot;&gt;
Ejemplo de uso de pyparsing&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Ejemplo-de-uso-de-pyparsing&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Vamos a utilizar&amp;nbsp;&lt;a href=&quot;http://pyparsing.wikispaces.com/home&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7;&quot; target=&quot;_blank&quot;&gt;pyparsing&lt;/a&gt;&amp;nbsp;para procesar un fichero csv. Para hacer las cosas más interesantes, supondremos que el formato de los ficheros es muy laxo; por ejemplo, podemos encontrarnos con lo siguiente:&lt;/div&gt;
&lt;ul style=&quot;box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin: 1em 2em 0em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Los campos de texto pueden venir entrecomillados o no&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Los campos de tipo fecha pueden venir en dos formatos: YYYY-MM-DD o DD/MM/YYYY&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Los campos de tipo booleano pueden venir con los valores&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;1&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;S&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Y&lt;/code&gt;&amp;nbsp;o&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;True&lt;/code&gt;&amp;nbsp;para el valor lógico verdadero, y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;0&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;N&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;F&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;False&lt;/code&gt;&amp;nbsp;para el valor lógico falso&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Los números decimales pueden venir con una coma o con un punto como separador decimal.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La primera línea contiene los nombres de los campos, el resto los datos; en los dos casos se separa cada valor por el caracter&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered selected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, rgb(66, 165, 245) -40px, rgb(66, 165, 245) 5px, transparent 5px, transparent 100%); border-color: rgb(171, 171, 171); border-radius: 2px; border-style: solid; border-width: 1px 1px 1px 0px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px 5px 5px 6px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Ejemplo-de-datos-a-procesar&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Ejemplo de datos a procesar&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Ejemplo-de-datos-a-procesar&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered selected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, rgb(66, 165, 245) -40px, rgb(66, 165, 245) 5px, transparent 5px, transparent 100%); border-color: rgb(171, 171, 171); border-radius: 2px; border-style: solid; border-width: 1px 1px 1px 0px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px 5px 5px 6px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Algo como esto:&lt;/div&gt;
&lt;pre style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; padding: 0px;&quot;&gt;Comentario;Activo;Fecha;Importe
Texto sin comillas porque yo lo valgo;Y;2017-08-08;4292.00
&quot;Ahora si que pongo comillas&quot;;F;25/8/2014;3200.00
Ya ves, todo vale;True;1/1/1970;4532,02
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Una-gramatica-para-estos-ficheros&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Una gramatica para estos ficheros&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Una-gramatica-para-estos-ficheros&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
La gramática podría ser algo así:&lt;/div&gt;
&lt;pre style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; padding: 0px;&quot;&gt;root -&amp;gt; header + lines
header -&amp;gt; \.+ # ignorar la linea 
lines -&amp;gt; line+
line -&amp;gt; text + sep + date + sep + bool + sep + cost
text -&amp;gt; &#39;&quot;&#39; + literal + &#39;&quot;&#39; | literal
date -&amp;gt; year + &#39;-&#39; + month + &#39;-&#39; + day | day + &#39;/&#39; + month + &#39;/&#39; + year
cost -&amp;gt; \d+[\.|,]\d{2}
bool -&amp;gt; &#39;1&#39; | &#39;S&#39; | &#39;Y&#39; | &#39;T&#39; | &#39;True&#39; | &#39;0&#39; | &#39;N&#39; | &#39;F&#39; | &#39;False&#39;
year -&amp;gt; \d{4}
month -&amp;gt; 1|2|3|4|5|6|7|8|9|10|11|12
day -&amp;gt; \d{1,2}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Implementación-con-pyparsing&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Implementación con pyparsing&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Implementación-con-pyparsing&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Las gramáticas pueden ser un poco intimidantes la primera vez que las ves. Lo bueno de pyparsing es que nos permite testear y modificar las distintas partes de la gramática como piezas sueltas. Así podemos crear el parser poco a poco, ensamblando las distinas piezas, con la confianza de que estas funcionan.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Parseando-fechas&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Parseando fechas&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Parseando-fechas&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Por ejemplo, para las fechas, que pueden venir en dos formatos, tenemos el siguiente fragmento de la gramática (pasado a la sintaxis de pyparsing, y por tanto cambiando el orden, la regla inicial sería la última):&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[2]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 149.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 164px; min-width: 651.859px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Literal&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;StringEnd&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Group&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;ParseException&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Literal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;-&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Literal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;/&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{4}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# pyparsong sobrecarga el operador ^ para indicar alternancia&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 164px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 0px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Literal&lt;/code&gt;&amp;nbsp;sirve para indicar una expresión o token literal, que queremos detectar durante la fase de parseo. Así, definimos&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;dash&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;slash&lt;/code&gt;&amp;nbsp;para detectar los literales&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;-&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;/&lt;/code&gt;. La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Regex&lt;/code&gt;&amp;nbsp;nos permite definir tokens usando expresiones regulares. Estos objetos, así como el resto de los que veremos, derivan de la clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;ParserElement&lt;/code&gt;&amp;nbsp;de pyparsing, que sobrecarga varios operadores para poder expresar las reglas de la gramática. Así, la regla:&lt;/div&gt;
&lt;pre style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; padding: 0px;&quot;&gt;date -&amp;gt; year + &#39;-&#39; + month + &#39;-&#39; + day | day + &#39;/&#39; + month + &#39;/&#39; + year
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Se puede expresar en Python con los operadores&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;+&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;^&lt;/code&gt;:&lt;/div&gt;
&lt;pre style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; padding: 0px;&quot;&gt;date = year + dash + month + dash + day ^ day + slash + month + slash + year
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Aparte de cambios como el uso del operador&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;^&lt;/code&gt;, o la definición de los literales&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;dash&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;slash&lt;/code&gt;, podemos ver que la gramática se mapea de forma casi directa a expresiones Python.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Veamos que tal funciona este mini-parser:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[3]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 132.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 147px; min-width: 314.797px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;try&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;hola&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;ParseException&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;pass&lt;/span&gt;  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Ok, no es una fecha&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;25/8/2016&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;2017-12-08&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 147px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 45.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;25&#39;, &#39;/&#39;, &#39;8&#39;, &#39;/&#39;, &#39;2016&#39;]
[&#39;2017&#39;, &#39;-&#39;, &#39;12&#39;, &#39;-&#39;, &#39;08&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
pyparsing define su propia clase de excepciones para errores de Parseo,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;parseException&lt;/code&gt;. Si nuestro parser es muy complicado puede ser interesante usar esta misma excepción para indicar nuestros propios errores. Por ejemplo, ahora mismo aceptamos para el día cualquier combinación de dos dígitos, e igualmente para el mes:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[4]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; min-width: 668.797px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;99/88/2016&#39;&lt;/span&gt;))  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# opps, esto no debería valer, pero vale&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;99&#39;, &#39;/&#39;, &#39;88&#39;, &#39;/&#39;, &#39;2016&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Más adelante veremos que podemos tratar estos casos y elevar errores explicativos que provoquen el fallo del parser.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Por ahora, poco más de lo que podríamos hacer simplemente con expresiones regulares.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Podemos realizar una pequeña mejora. Observemos un detalle de los separadores usados en el formato de fechas, definidos como&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;dash&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;slash&lt;/code&gt;; en realidad, sus valores no nos interesan. Podemos calcular el valor de la fecha sin necesidad de saber que caracteres se usaron como separador. Estos elementos son necesarios para el parser, pero no tienen más utilidad.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Existe una clase en pyparsing llamada&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Suppress&lt;/code&gt;&amp;nbsp;que funciona exactamente igual que&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Literal&lt;/code&gt;, pero que retira el token, de forma que nos evitamos procesarlo. Cambiemos la gramática para redefinir&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;dash&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;slash&lt;/code&gt;&amp;nbsp;usando&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Suppress&lt;/code&gt;&amp;nbsp;en vez de&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Literal&lt;/code&gt;:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[5]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 174.125px; overflow: hidden; position: relative; top: 39.5938px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 132.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 147px; min-width: 643px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 168.531px; pointer-events: none; position: absolute; top: 34px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;-&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;/&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{4}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 147px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[6]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; min-width: 584.5px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;23/9/2016&#39;&lt;/span&gt;))  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# bien, el separador desaparece&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;23&#39;, &#39;9&#39;, &#39;2016&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
No está mal, pero la mejora realmente interesante sería que nos devolviera algo más elaborado, un objeto de tipo fecha, objetos de tipo&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;datetime.datetime&lt;/code&gt;, por ejemplo. Vamos a ello. Para eso, necesitamos usar las&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;reglas de parseo&lt;/strong&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Reglas-de-parseo&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 1.55em 0px 0px;&quot;&gt;
Reglas de parseo&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Reglas-de-parseo&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Podemos asociar acciones a las reglas de parseo (en este daso,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;date&lt;/code&gt;) para que se ejecuten cada vez qe se active la regla.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Vamos a asociar una función que no haga nada, solo imprimir un valor para ver que, efectivamente, se ejecuta cuando la regla de parseo se activa. Usaremos el método&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;setParseAction&lt;/code&gt;:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[7]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 98.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 113px; min-width: 356.969px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;very_simple_action&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;OK, se ha ejecutado la acción&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;very_simple_action&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;25/8/2016&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;2017-12-08&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 113px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 79.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;OK, se ha ejecutado la acción
[&#39;25&#39;, &#39;8&#39;, &#39;2016&#39;]
OK, se ha ejecutado la acción
[&#39;2017&#39;, &#39;12&#39;, &#39;08&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
De la documentación de pyparsing, podemos obtener más información sobre como definir y usar estas acciones:&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Podemos definir uno o varias acciones a realizar cuando se produce una coincidencia que activa la regla del parser. Estas acciones pueden ser cualquier objeto de tipo&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callable&lt;/em&gt;&amp;nbsp;de python; es decir, funciones, métodos u objetos instanciados de clases que definan el método mágico&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;__call__&lt;/code&gt;.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Las acciones pueden aceptar desde cero hasta tres argumentos, es decir que, dependiendo de como definamos la acción&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;fn&lt;/code&gt;, esta será llamada como&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;fn()&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;fn(toks)&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;fn(loc, toks)&lt;/code&gt;&amp;nbsp;o&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;fn(s, loc, toks)&lt;/code&gt;. El significado de estos parámetros es el siguiente:&lt;/div&gt;
&lt;ul style=&quot;box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin: 1em 2em 0em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;s&lt;/code&gt;: es la string original que activó el patrón de la regla&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;loc&lt;/code&gt;: es la localización, dentro del texto, de la substring&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;s&lt;/code&gt;&amp;nbsp;(Útil para generar mensajes de error)&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;toks&lt;/code&gt;: Una lista de los tokens encontrados, empaquetados en forma de objeto de tipo&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;ParseResults&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Si la función quiere modificar los tokens, debe devolver un nuevo valor como resultado de la función, con lo que la lista de tokens devueltos reemplazaría a la original. Si no queremos realizar ningún cambio, la función no debe retornar ningún valor.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Definamos una acción, solo para ver que estos parámetros se pasan efectivamente:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[8]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 308.594px; overflow: hidden; position: relative; top: 124.594px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 132.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 147px; min-width: 314.781px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 303px; pointer-events: none; position: absolute; top: 119px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;I_just_wanna_see&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;s&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;loc&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;s:&#39;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;loc:&#39;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;loc&lt;/span&gt;)   &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;tokens:&#39;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;I_just_wanna_see&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;25/8/2016&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 147px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 96.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;s: 25/8/2016
loc: 0
tokens: [&#39;25&#39;, &#39;8&#39;, &#39;2016&#39;]

[&#39;25&#39;, &#39;8&#39;, &#39;2016&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Nota&lt;/strong&gt;: Podemos asignar varias acciones usando el método&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;addParseAction&lt;/code&gt;. en ese caso, las acciones se ejecutan de forma anidada, siendo la primera en ejecutarse la primera en añadirse. Cada acción recibe como entrada el resultado de la anterior y pasa su resultado a la siguiente. Veamos un ejemplo:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[9]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 508.562px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Literal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;hola&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;addParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ei&#39;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ai&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;addParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;upper&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;hola&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;EIHOLAAI&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Si cambiamos el orden en que se añaden las acciones, el resultado puede diferir, lógicamente:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[10]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 508.562px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Literal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;hola&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;addParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;upper&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;addParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ei&#39;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ai&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;token&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;hola&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;eiHOLAai&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Con esto ya podemos definir una acción que nos devuelva un objeto&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;date&lt;/code&gt;. Usaremos una acción con un solo parámetro,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;tokens&lt;/code&gt;, la lista de los tokens detectados, ya que no necesitamos los otros parámetros.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Como devolvemos un valor, el parser sustituirá la lista de tokens detectados por ese nuevo valor.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[11]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 353.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 368px; min-width: 449.641px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;datetime&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_date&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;first_element&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;len&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;first_element&lt;/span&gt;) == &lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;4&lt;/span&gt;:  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Formato YYYY-MM-DD&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;        &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;d&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;datetime&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Year&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;1&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Month&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;2&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Day&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            )&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;else&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;        &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;d&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;datetime&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;2&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Year&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;1&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Month&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;]),  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Day&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;            )&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;d&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_date&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;25/8/2016&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;2017-12-08&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 368px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 45.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[datetime.date(2016, 8, 25)]
[datetime.date(2017, 12, 8)]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Vamos-a-parsear-valores-lógicos&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Vamos a parsear valores lógicos&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Vamos-a-parsear-valores-lógicos&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Podemos hacer algo similar con los objetos booleanos. Usaremos una de las funciones auxiliares de pyparsing,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;oneOf&lt;/code&gt;, que nos permite definir de forma rápida un conjunto de literales alternativos. Además se asegura de que siempre intentará capturar el literal más grande, en caso de que haya conflicto entre alguno de ellos; por ejemplo, entre&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&amp;lt;&lt;/code&gt;&amp;nbsp;y&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&amp;lt;=&lt;/code&gt;&amp;nbsp;primero intentará encontrar una correspondencia con el más largo,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&amp;lt;=&lt;/code&gt;, y si no la encuentra lo intentará con&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&amp;lt;&lt;/code&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[12]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 365.406px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1 S Y T True 0 N F False&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;True&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;True&#39;]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Con un poco de mágia en forma de acción asociada a la regla obtendremos valores booleanos de Python. LA API de pyparsing es fluida, por lo que podemos definir la regla y asociar la acción en una sola línea:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[13]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 285.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 300px; min-width: 601.375px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_bool&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;] &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;in&lt;/span&gt; (&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;S&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Y&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;T&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;True&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1 S Y T True 0 N F False&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_bool&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# simple tests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;S&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Y&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;T&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;True&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;0&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;N&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;F&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;False&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 300px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 0px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Parsear-los-importes&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Parsear los importes&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Parsear-los-importes&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Nos queda el problema de los importes, que pueden usar como separador decimal la coma, al estilo español, o el punto, al estilo internacional, y las cadenas de textos, que pueden venir limitadas por comillas o no. Los dos casos son fáciles de tratar:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[14]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 407.438px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;. ,&#39;&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d\d&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;3819.24&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt output_prompt&quot; style=&quot;box-sizing: border-box; color: #d84315; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
Out[14]:&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_result&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;([&#39;3819&#39;, &#39;.&#39;, &#39;24&#39;], {})&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Word&lt;/code&gt;&amp;nbsp;nos permite definir una palabra, pasandole uno o dos parámetros, que son vocabularios. Los vocabularios se pueden indicar con una string de símbolos, como&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&#39;aeiou&#39;&lt;/code&gt;.&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;nums&lt;/code&gt;&amp;nbsp;es solo una constante definida en pyparsing que vale&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;&#39;0123456789&#39;&lt;/code&gt;. Podiamos haber usado una expresión regular, pero&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Word&lt;/code&gt;&amp;nbsp;es bastante interesante.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Si a&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Word&lt;/code&gt;&amp;nbsp;se le pasa un solo vocabulario, define una palabra como una secuencia de n caracteres tomados de los símbolos definidos en el vocabulario.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Si se le pasan dos vocabularios, define una palabra como una secuencia donde el primer caracter debe pertenecer al primer vocabulario y el resto, si los hubiera, al segundo. Por ejemplo, podemos definir un parser para los nombres válidos de Python, que permiten el uso de carateres alfanuméricos y el carácter subrayado, pero no no se permiten que empiece por un dígito:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[15]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 268.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 283px; min-width: 601px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphanums&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphas&lt;/span&gt; == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphanums&lt;/span&gt; == &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphas&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphas&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;_&#39;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphanums&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;_&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;a&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;a1&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;alp_ha&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;try&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1uno&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;ParseException&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Oops, no se permite el caracter &#39;_&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;pass&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 283px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Definamos otra patrón, incluyendo el símbolo dolar como caracter válido al principio, PERL-style:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[16]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 592.906px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name_plus&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphas&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;$&#39;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;alphanums&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;_&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name_plus&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;a&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name_plus&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;$_alpha&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;$_alpha&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;var_name_plus&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;$Alpha_plus&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;$Alpha_plus&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 0px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Hecha esta disgresión, volvamos al problema de tratar los importes. Añadamos una acción para obtener un número de tipo Decimal:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[17]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 251.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 266px; min-width: 491.719px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;decimal&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Decimal&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_decimal&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;int_part&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dec_part&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Decimal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;{}.{}&#39;&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;int_part&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dec_part&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;. ,&#39;&lt;/span&gt;)) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d\d&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_decimal&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;484432,23&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;num_esp&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;484432,23&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;num_int&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;484432.23&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;num_esp&lt;/span&gt; == &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;num_int&lt;/span&gt; == &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Decimal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;484432.23&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;3.14&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 266px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[Decimal(&#39;3.14&#39;)]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Cadenas-de-texto-con-o-sin-delimitador&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Cadenas de texto con o sin delimitador&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Cadenas-de-texto-con-o-sin-delimitador&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Para poder procesar las cadenas de texto, ignorando si procede las comillas delimitadoras opcionales, podemos hacer:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[18]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 115.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 130px; min-width: 651.953px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&quot;&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&quot;[^\&quot;;]+&quot;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Cualquier secuencia de caracteres, excepto ; y &quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Texto sin comillas&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Texto sin comillas&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;assert&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&quot;Texto con comillas&quot;&#39;&lt;/span&gt;).&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;pop&lt;/span&gt;() == &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Texto con comillas&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 130px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 0px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Bueno, ha sido un viaje un poco largo, con paradas en algunos puntos interesantes, pero ya podemos escribir la gramática completa, junto al parser y las acciones aplicadas:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[19]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 778.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 793px; min-width: 651.953px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;pyparsing&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;OneOrMore&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Funciones de conversion&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_decimal&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;s&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;lok&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;int_part&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;_sep&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dec_part&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Decimal&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;{}.{}&#39;&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;int_part&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dec_part&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_date&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;s&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;loc&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;b&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;c&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;len&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;a&lt;/span&gt;) == &lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;4&lt;/span&gt;:  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Formato YYYY-MM-DD&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;        &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;datetime&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;a&lt;/span&gt;), &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;b&lt;/span&gt;), &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;c&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;else&lt;/span&gt;:  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Formato DD/MM/YYYY&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;        &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;datetime&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;c&lt;/span&gt;), &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;b&lt;/span&gt;), &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;int&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;a&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot; style=&quot;box-sizing: border-box; color: blue;&quot;&gt;get_as_bool&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;s&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;loc&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;] &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;in&lt;/span&gt; (&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;S&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Y&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;T&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;True&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;sep&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;;&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&quot;&#39;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Texto&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&quot;[^\&quot;;]+&quot;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Cualquier secuencia de caracteres, excepto ; y &quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;quote&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;content&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;[&lt;span class=&quot;cm-number&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;strip&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;1 S Y T True 0 N F False&#39;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Valores lógicos&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_bool&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;-&#39;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Fechas&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;/&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{4}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d{1,2}&#39;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;day&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;month&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;year&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_date&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Word&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;nums&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;oneOf&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;. ,&#39;&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;\d\d&#39;&lt;/span&gt;)  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Importes&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;get_as_decimal&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;line&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Group&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;sep&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;sep&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;sep&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;cost&lt;/span&gt;)  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# One Line&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;lines&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;OneOrMore&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;line&lt;/span&gt;)  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Lines&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;lines&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;setParseAction&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;: &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;list&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;tokens&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;header&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Suppress&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;Regex&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;.+&#39;&lt;/span&gt;))  &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# Header&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;parser&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;header&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;lines&lt;/span&gt; &lt;span class=&quot;cm-operator&quot; style=&quot;box-sizing: border-box; color: #aa22ff; font-weight: bold;&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;StringEnd&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot; style=&quot;box-sizing: border-box; color: #408080; font-style: italic;&quot;&gt;# First rule&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 793px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 0px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;ul style=&quot;box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin: 0em 2em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;OneOrMore&lt;/code&gt;&amp;nbsp;nos permite implementar las reglas de&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;una secuencia de uno o más elementos repetidos&lt;/em&gt;, como su mismo nombre indica. Pyparsing define muchos más clases de este tipo, como&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;ZeroOrMore&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Optional&lt;/code&gt;, (Uno o cero),&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;OnlyOne&lt;/code&gt;...&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;Group&lt;/code&gt;&amp;nbsp;nos permite agrupar varios tokens en un solo resultado, normalmente porque vamos a tratarlos todos juntos.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La clase&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;StringEnd&lt;/code&gt;&amp;nbsp;nos permite indicar que el parser, al consumir este token, debería de haber terminado, es decir, que todo el texto a parserar debe consumirse íntegramente.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
Vamos a hacer unas pruebas parseando líneas individuales:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[20]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; min-width: 719px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;line&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Texto sin comillas porque yo lo valgo;Y;2017-08-08;4292.00&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[[&#39;Texto sin comillas porque yo lo valgo&#39;, True, datetime.date(2017, 8, 8), Decimal(&#39;4292.00&#39;)]]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[21]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; min-width: 643.516px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;line&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&quot;Ahora si que pongo comillas&quot;;F;25/8/2014;3200.00&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[[&#39;Ahora si que pongo comillas&#39;, False, datetime.date(2014, 8, 25), Decimal(&#39;3200.00&#39;)]]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[22]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; min-width: 559px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;line&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;Ya ves, todo vale;True;1/1/1970;4532,02&#39;&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 28.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[[&#39;Ya ves, todo vale&#39;, True, datetime.date(1970, 1, 1), Decimal(&#39;4532.02&#39;)]]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unrendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-default CodeMirror-wrap&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 13.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 28px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;print(header.parseString(&#39;Comentario;Activo;Fecha;Importe&#39;))  # Ignoramos la cabecera&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 28px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Y la prueba de fuego, un fichero completo:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[23]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 5.59375px; overflow: hidden; position: relative; top: 5.59375px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 132.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 147px; min-width: 491.859px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 0px; pointer-events: none; position: absolute; top: 0px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;source&lt;/span&gt; = &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&#39;&#39;Comentario;Activo;Fecha;Importe&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;Texto sin comillas porque yo lo valgo;Y;2017-08-08;4292.00&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&quot;Ahora si que pongo comillas&quot;;F;25/8/2014;3200.00&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;Ya ves, todo vale;True;1/1/1970;4532,02&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;g&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;parser&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseString&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;source&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;g&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;item&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 147px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 62.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;Texto sin comillas porque yo lo valgo&#39;, True, datetime.date(2017, 8, 8), Decimal(&#39;4292.00&#39;)]
[&#39;Ahora si que pongo comillas&#39;, False, datetime.date(2014, 8, 25), Decimal(&#39;3200.00&#39;)]
[&#39;Ya ves, todo vale&#39;, True, datetime.date(1970, 1, 1), Decimal(&#39;4532.02&#39;)]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Unsado el método&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;parseFile&lt;/code&gt;&amp;nbsp;podemos procesar un fichero, si especificamos el nombre, un fichero abierto, o cualquier objeto que implemente una interfaz similar a&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;File&lt;/code&gt;:&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell code_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: column; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;input&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row;&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0.4em; text-align: right; user-select: none;&quot;&gt;
In&amp;nbsp;[24]:&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-ipython&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 165.703px; overflow: hidden; position: relative; top: 56.5938px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 64.1875px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 79px; min-width: 340.031px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17px; left: 160.109px; pointer-events: none; position: absolute; top: 51px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;ejemplo.csv&#39;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot; style=&quot;box-sizing: border-box; color: #ba2121;&quot;&gt;&#39;r&#39;&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;stream&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;g&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;parser&lt;/span&gt;.&lt;span class=&quot;cm-property&quot; style=&quot;box-sizing: border-box;&quot;&gt;parseFile&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;stream&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;    &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot; style=&quot;box-sizing: border-box; color: green; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;g&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; word-break: break-all; word-wrap: normal; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;        &lt;span class=&quot;cm-builtin&quot; style=&quot;box-sizing: border-box; color: green;&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot; style=&quot;box-sizing: border-box;&quot;&gt;item&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 79px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;output_wrapper&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; position: relative; z-index: 1;&quot;&gt;
&lt;div class=&quot;out_prompt_overlay prompt&quot; style=&quot;border-radius: 2px; box-sizing: border-box; cursor: default; font-family: monospace; height: 79.1875px; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; position: absolute; text-align: right; user-select: none;&quot; title=&quot;click to scroll output; double click to hide&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column;&quot;&gt;
&lt;div class=&quot;output_area&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; box-sizing: border-box; break-inside: avoid; display: flex; flex-direction: row; padding: 0px;&quot;&gt;
&lt;div class=&quot;prompt&quot; style=&quot;box-sizing: border-box; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;output_subarea output_text output_stream output_stdout&quot; style=&quot;-webkit-box-flex: 1; box-sizing: border-box; flex: 1 1 0%; line-height: 1.21429em; max-width: calc(100% - 14ex); overflow-x: auto; padding: 0.4em;&quot;&gt;
&lt;pre style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: inherit; line-height: inherit; overflow: auto; padding: 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;[&#39;Texto sin comillas porque yo lo valgo&#39;, True, datetime.date(2017, 8, 8), Decimal(&#39;4292.00&#39;)]
[&#39;Ahora si que pongo comillas&#39;, False, datetime.date(2014, 8, 25), Decimal(&#39;3200.00&#39;)]
[&#39;Ya ves, todo vale&#39;, True, datetime.date(1970, 1, 1), Decimal(&#39;4532.02&#39;)]
[&#39;Los espacios no son problema&#39;, False, datetime.date(2017, 2, 22), Decimal(&#39;1203.23&#39;)]
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h2 id=&quot;Ventajas-de-Pyparsing&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px;&quot;&gt;
Ventajas de Pyparsing&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Ventajas-de-Pyparsing&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell unselected rendered&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell unrendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;input_area&quot; style=&quot;background: rgb(247, 247, 247); border-radius: 2px; border: 1px solid rgb(207, 207, 207); box-sizing: border-box; line-height: 1.21429em;&quot;&gt;
&lt;div class=&quot;CodeMirror cm-s-default CodeMirror-wrap&quot; style=&quot;background: none; box-sizing: border-box; font-family: monospace; height: auto; line-height: 1.21429em; overflow: hidden; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; height: 0px; left: 427px; overflow: hidden; position: relative; top: 209.094px; width: 3px;&quot;&gt;
&lt;textarea autocapitalize=&quot;off&quot; autocorrect=&quot;off&quot; spellcheck=&quot;false&quot; style=&quot;bottom: -1em; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 1em; line-height: inherit; margin: 0px; outline: none; overflow: auto; padding-left: 0px; padding-top: 0px; position: absolute; width: 1000px;&quot; tabindex=&quot;0&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;
&lt;div class=&quot;CodeMirror-scroll&quot; style=&quot;box-sizing: content-box; height: 234.188px; margin-bottom: -30px; margin-right: -30px; outline: none; overflow-x: auto; overflow-y: hidden; padding-bottom: 30px; position: relative;&quot; tabindex=&quot;-1&quot;&gt;
&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;border-right: 15px solid transparent; box-sizing: content-box; margin-bottom: -15px; margin-left: 0px; min-height: 249px; padding-bottom: 0px; padding-right: 0px; position: relative;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; top: 0px;&quot;&gt;
&lt;div class=&quot;CodeMirror-lines&quot; style=&quot;box-sizing: border-box; cursor: text; min-height: 1px; padding: 0.4em;&quot;&gt;
&lt;div style=&quot;box-sizing: border-box; outline: none; position: relative;&quot;&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-measure&quot; style=&quot;box-sizing: border-box; height: 0px; overflow: hidden; position: absolute; visibility: hidden; width: 972.812px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; position: relative; z-index: 1;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-cursors&quot; style=&quot;box-sizing: border-box; position: relative; visibility: hidden; z-index: 3;&quot;&gt;
&lt;div class=&quot;CodeMirror-cursor&quot; style=&quot;border-left: 1px solid black; border-right: none; box-sizing: border-box; height: 17.5px; left: 421.406px; pointer-events: none; position: absolute; top: 203.5px; width: 0px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;CodeMirror-code&quot; style=&quot;box-sizing: border-box; outline: none;&quot;&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;cm-strong cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa; font-weight: bold;&quot;&gt;**Robusto y sencillo de usar**&lt;/span&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;. Pyparsing lleva más de una década de desarrollo, y se basa en el uso de gramáticas para la definición formal de lenguajes. El paso de la gramática a código Python es casi directo.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;cm-strong cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa; font-weight: bold;&quot;&gt;**Desarrollo incremental, facilmente testeable**&lt;/span&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;. El parser final se puede ir construyendo paso a paso.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;- No se ve en los ejemplo, pero podemos añadir &lt;/span&gt;&lt;span class=&quot;cm-strong cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa; font-weight: bold;&quot;&gt;**validaciones y mensajes de error explicativos**&lt;/span&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt; que simplifican la resolución de problemas --incluyendo, por ejemplo, número de línea y posición del error. Podemos asignar nombres a los resultados de los tokens para que seán más sencillos de referencias, y muchas otras funcionalidades que no hemos podido ver aquí.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;- &lt;/span&gt;&lt;span class=&quot;cm-strong cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa; font-weight: bold;&quot;&gt;**Flexible**&lt;/span&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;, comparado con un parser hecho a mano o en base a un montón de espresiones regulares. A modo de ejemplo, véanse los &lt;/span&gt;&lt;span class=&quot;cm-strong cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa; font-weight: bold;&quot;&gt;**ejercicios para el lector**&lt;/span&gt;&lt;span class=&quot;cm-variable-2&quot; style=&quot;box-sizing: border-box; color: #0055aa;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot; CodeMirror-line &quot; style=&quot;-webkit-tap-highlight-color: transparent; background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: inherit; font-size: inherit; font-variant-ligatures: contextual; line-height: inherit; overflow: visible; padding: 0px; position: relative; white-space: pre-wrap; word-break: normal; word-wrap: break-word; z-index: 2;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot; style=&quot;box-sizing: border-box;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom: 0px solid transparent; box-sizing: border-box; height: 15px; position: absolute; top: 249px; width: 1px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Ejercicios-para-el-lector&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Ejercicios para el lector&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Ejercicios-para-el-lector&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;ul style=&quot;box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin: 1em 2em 0em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Añadir otro formato válido para las fechas, por ejemplo,&amp;nbsp;&lt;code style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; padding: 0px; white-space: pre-wrap;&quot;&gt;10/abr/2017&lt;/code&gt;&amp;nbsp;(10 puntos)&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Permitir que la última columna, el importe, acepte también un valor entero, es decir, sin parte decimal (20 puntos)&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Permitir que los textos puedan venir sin comillas, con comillas simples o con comillas dobles (20 puntos)&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
El jefe ha modificado el formato, el fichero tiene ahora una última ĺinea donde va el total acumulado de todos los importes previos, algo así:&lt;/div&gt;
&lt;pre style=&quot;border-radius: 2px; border: 0px; box-sizing: border-box; line-height: inherit; margin: 1em 2em; overflow: auto; padding: 0px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;border-radius: 0px; border: 0px; box-sizing: border-box; padding: 0px;&quot;&gt;  Comentario;Activo;Fecha;Importe
  Texto sin comillas porque yo lo valgo;Y;2017-08-08;4292.00
  &quot;Ahora si que pongo comillas&quot;;F;25/8/2014;3200.00
  Ya ves, todo vale;True;1/1/1970;4532,02
  12024.02
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;box-sizing: border-box; margin-top: 1em;&quot;&gt;
El parser debe adaptarse a este cambio, y comprobar que la suma de los importes coincide con el dato final. Si, ya sé que, técnicamente, esto ha dejado de ser un CSV. Estas cosas pasan. (100 puntos y una gran satisfacción personal)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;prompt input_prompt&quot; style=&quot;border-top: 1px solid transparent; box-sizing: border-box; color: #303f9f; cursor: default; font-family: monospace; line-height: 1.21429em; margin: 0px; min-width: 14ex; padding: 0px 0.4em; text-align: right; user-select: none;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;h3 id=&quot;Mas-información&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: inherit; font-size: 18.004px; line-height: 1; margin: 0.777em 0px 0px;&quot;&gt;
Mas información&lt;a class=&quot;anchor-link&quot; href=&quot;http://localhost:8889/notebooks/Ejemplo-uso-pyparsing.ipynb#Mas-información&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7; padding: 0px 20px; text-decoration-line: none; visibility: hidden;&quot;&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;h2 style=&quot;color: inherit; font-family: inherit; font-size: 21.994px; line-height: 1; margin: 0.636em 0px 0px; padding: 0px; text-rendering: optimizeLegibility;&quot;&gt;
&lt;div class=&quot;cell text_cell rendered unselected&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-orient: horizontal; align-items: stretch; background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%); border-color: transparent; border-radius: 2px; border-style: solid; border-width: 1px; box-sizing: border-box; display: flex; flex-direction: row; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: normal; margin: 0px; outline: none; padding: 5px; width: 1110px;&quot; tabindex=&quot;2&quot;&gt;
&lt;div class=&quot;inner_cell&quot; style=&quot;-webkit-box-align: stretch; -webkit-box-flex: 1; -webkit-box-orient: vertical; align-items: stretch; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 0%; min-width: 0px;&quot;&gt;
&lt;div class=&quot;text_cell_render rendered_html&quot; style=&quot;border-style: none; box-sizing: border-box; outline: none; overflow-x: auto; overflow-y: hidden; padding: 0.5em 0.5em 0.5em 0.4em; resize: none; width: inherit;&quot; tabindex=&quot;-1&quot;&gt;
&lt;ul style=&quot;box-sizing: border-box; list-style-image: initial; list-style-position: initial; margin: 1em 2em 0em; padding-left: 0px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
La página web de pyparsing:&amp;nbsp;&lt;a href=&quot;http://pyparsing.wikispaces.com/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7;&quot; target=&quot;_blank&quot;&gt;http://pyparsing.wikispaces.com/&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;
Parsing In Python: Tools And Libraries&amp;nbsp;&lt;a href=&quot;https://tomassetti.me/parsing-in-python/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: #337ab7;&quot; target=&quot;_blank&quot;&gt;https://tomassetti.me/parsing-in-python/&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/1899099927166426798/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/1899099927166426798' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/1899099927166426798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/1899099927166426798'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2017/08/ejemplo-de-uso-de-pyparsing.html' title='Ejemplo de uso de pyparsing'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-6081751318078819749</id><published>2017-05-22T12:24:00.000+01:00</published><updated>2017-08-09T11:46:59.049+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2017"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="pyBirras"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="tenerife"/><title type='text'>PyBirras Edición Pre-veranito (1/jun/2017)</title><content type='html'>El próximo &lt;b&gt;1 de junio, jueves&lt;/b&gt;, a partir de las 18:00 tendremos un nuevo encuentro de desarrolladores para hablar de nuestros temas favoritos: desarrollo, unicornios y cervezas. En esta ocasión tendremos tres charlas:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;AWS: Desplegando Python en Amazon&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;PyTesting e integración continua con Travis&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Vue.js: El framework javascript para muggles&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
Tras las cuales tendremos la segunda parte: networking, vida social, risas y ping pong. Todo ello en las instalaciones del Equipo Para (C/La Marina, 4, Santa cruz de Tenerife).&lt;br /&gt;
Por favor, confirmad la asistencia en el meetup, para poner las cervezas a enfriar.&lt;br /&gt;
&lt;a href=&quot;https://www.meetup.com/Agile-Canarias/events/235289799/&quot;&gt;&lt;tt&gt;https://www.meetup.com/Agile-Canarias/events/235289799/&lt;/tt&gt;&lt;/a&gt;&lt;br /&gt;
Esta vez nos hemos venido arriba y tenemos hasta cartel promocional:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtwwec75PH0kXX7sPlVf_HQ3BXuK0xod0cF7Tgzgu_6naezsaCtXJEfaNEgxUSU5O8jZTGGjK5fh0u5ZqeZgz5rYtsjVq2CLw0IazsXcFWwhoSc98BP7nOKLBnZT_RsrEuACqE/s1600/cartel.pybirras-junio-2017-xs.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtwwec75PH0kXX7sPlVf_HQ3BXuK0xod0cF7Tgzgu_6naezsaCtXJEfaNEgxUSU5O8jZTGGjK5fh0u5ZqeZgz5rYtsjVq2CLw0IazsXcFWwhoSc98BP7nOKLBnZT_RsrEuACqE/s1600/cartel.pybirras-junio-2017-xs.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/6081751318078819749/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/6081751318078819749' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6081751318078819749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6081751318078819749'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2017/05/pybirras-edicion-pre-veranito-1jun2016.html' title='PyBirras Edición Pre-veranito (1/jun/2017)'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtwwec75PH0kXX7sPlVf_HQ3BXuK0xod0cF7Tgzgu_6naezsaCtXJEfaNEgxUSU5O8jZTGGjK5fh0u5ZqeZgz5rYtsjVq2CLw0IazsXcFWwhoSc98BP7nOKLBnZT_RsrEuACqE/s72-c/cartel.pybirras-junio-2017-xs.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-3223422017653344637</id><published>2017-02-16T20:20:00.000+00:00</published><updated>2017-02-16T20:21:52.193+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="congreso"/><category scheme="http://www.blogger.com/atom/ns#" term="imprescindible"/><category scheme="http://www.blogger.com/atom/ns#" term="PyDay"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="tenerife"/><title type='text'>El 11 de marzo tendremos el primer PyDay en Canarias</title><content type='html'>&lt;p&gt;El &lt;b&gt;11 de marzo&lt;/b&gt; tendremos &lt;a href=&quot;http://www.pythoncanarias.es/pyday/&quot;&gt;el primer &lt;b&gt;PyDay&lt;/b&gt; en Canarias&lt;/a&gt;.Un PyDay es una jornada de un día completo sobre el lenguaje de programación Python, con el
formato de unas conferencias pero un poco más dinámico. La cita es en la &lt;a href=&quot;https://goo.gl/i9YMiv&quot;&gt;Sala de Estudio Caja Canarias Campus Anchieta&lt;/a&gt;. Como el foro es limitado, &lt;a href=&quot;http://www.pythoncanarias.es/pyday/inscripcion/&quot;&gt;debéis inscribiros en esta página&lt;/a&gt;, pero, por favor, hacedlo sólo si vais a asistir seguro, si no le estareis quitando la plaza a otros ser humano interesado.&lt;/p&gt; 


&lt;div style&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.pythoncanarias.es/pyday/&quot;&gt;&lt;img src=&quot;https://github.com/pythoncanarias/docs/raw/master/carteleria/cartel_pyday_teaser_2017-xs.png&quot; width=&quot;420&quot; height=&quot;774&quot; alt=&quot;Primer PyDay tenerife 2017&quot;&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;En este caso constará de dos &lt;i&gt;tracks&lt;/i&gt; independientes, uno de talleres introductorios y otro de
charlas más avanzadas.&lt;/p&gt;

&lt;p&gt;Para los alumnos de la Universidad de La Laguna, la asistencia es compatible con un crédito ECTS.&lt;/p&gt;

&lt;p&gt;En la web podéis consultar &lt;a href=&quot;http://www.pythoncanarias.org/pyday/programa/&quot;&gt;todo el programa del próximo PyDay Tenerife&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Por último, si promocionas el evento por tus redes sociales, te agradeceríamos mucho si incluyeras el &lt;i&gt;Hashtag&lt;/i&gt; &lt;code&gt;#PyDayTf&lt;/code&gt;.&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/3223422017653344637/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/3223422017653344637' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3223422017653344637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3223422017653344637'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2017/02/el-11-de-marzo-tendremos-el-primer.html' title='El 11 de marzo tendremos el primer PyDay en Canarias'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-4428392289857625750</id><published>2016-02-15T08:00:00.000+00:00</published><updated>2016-02-16T00:14:48.267+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="arte"/><category scheme="http://www.blogger.com/atom/ns#" term="Big Culo Day"/><category scheme="http://www.blogger.com/atom/ns#" term="comics"/><category scheme="http://www.blogger.com/atom/ns#" term="viajes"/><title type='text'>Mi aportación al #BigCuloDay16</title><content type='html'>&lt;p&gt;Un año más llegamos a la IX edición de este -a veces fatalmente incomprendido- llamamiento a la paz, la esperanza y, por que no decirlo, el amor conocido como el &lt;b&gt;&lt;a href=&quot;http://jotacedt.blogspot.com.es/2016/02/anda-la-osa-lo-de-los-culos.html&quot;&gt;Big Culo Day&lt;/a&gt;&lt;/b&gt;. Esta vez toca un clásico europeo, &lt;a href=&quot;http://www.natacha-comics.com/&quot;&gt;Natasha&lt;/a&gt;, La azafata de maravillosas formas dibujada por François Walthér, y que ahora esta siendo recuperada en una &lt;a href=&quot;http://www.dolmeneditorial.com/natacha-vol-4/&quot;&gt;serie de integrales de Dolmen&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmn1aRZ-7tmxj7mb67fYqf9QjBqHX7YE7RRR-rAAIYeoNvYYhhjF9uDgdzGZByk5STA-xxrXWrfwuYw7Ptz9VirOTW8lKhdoITONm0m9qOcFZMl0FBNVaao1tOdq65xz3rwyTX/s1600/natasha.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmn1aRZ-7tmxj7mb67fYqf9QjBqHX7YE7RRR-rAAIYeoNvYYhhjF9uDgdzGZByk5STA-xxrXWrfwuYw7Ptz9VirOTW8lKhdoITONm0m9qOcFZMl0FBNVaao1tOdq65xz3rwyTX/s1600/natasha.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/4428392289857625750/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/4428392289857625750' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4428392289857625750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4428392289857625750'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2016/02/mi-aportacion-al-bigculoday16.html' title='Mi aportación al #BigCuloDay16'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmn1aRZ-7tmxj7mb67fYqf9QjBqHX7YE7RRR-rAAIYeoNvYYhhjF9uDgdzGZByk5STA-xxrXWrfwuYw7Ptz9VirOTW8lKhdoITONm0m9qOcFZMl0FBNVaao1tOdq65xz3rwyTX/s72-c/natasha.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-621025794274086482</id><published>2015-10-16T15:24:00.001+01:00</published><updated>2015-10-16T15:24:21.623+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chuleta"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Recetas Habituales en Django (Que siempre se me olvidan)</title><content type='html'>&lt;div class=&quot;section&quot; id=&quot;como-probar-las-paginas-de-errores-404-etc-en-desarrollo&quot;&gt;
&lt;h2&gt;
¿Cómo probar las páginas de errores (404, etc...) en desarrollo?&lt;/h2&gt;
Para ver esas páginas de error, hay que desactivar la opción &lt;tt class=&quot;docutils literal&quot;&gt;DEBUG&lt;/tt&gt;
de la configuración. Pero si lo hacemos, los contenidos estáticos dejan de
servirse, así que no podemos estar seguros de como se verán las páginas
finales, a no ser que instalemos nuestro propio servidor de contenidos
estáticos.&lt;br /&gt;
O, por otro lado, podemos usar el flag &lt;tt class=&quot;docutils literal&quot;&gt;insecure&lt;/tt&gt; al llamar a &lt;tt class=&quot;docutils literal&quot;&gt;runserver&lt;/tt&gt;:&lt;br /&gt;
&lt;pre class=&quot;literal-block&quot;&gt;manage.py runserver --insecure
&lt;/pre&gt;

&lt;p&gt;Esto obliga al servidor de desarrollo a servir los ficheros a partir
de los directorios &lt;tt class=&quot;docutils literal&quot;&gt;static&lt;/tt&gt; de las aplicaciones, aunque la variable
&lt;tt class=&quot;docutils literal&quot;&gt;settings.DEBUG&lt;/tt&gt; sea &lt;tt class=&quot;docutils literal&quot;&gt;False&lt;/tt&gt;.&lt;br /&gt;

&lt;p&gt;De ninguna manera debemos usar este truco para poner en explotación un
servidor de desarrollo de Django. Citando la documentación oficial:&lt;br /&gt;
&lt;blockquote&gt;
[...] By using this you
acknowledge the fact that it’s grossly inefficient and probably insecure.
This is only intended for local development, should never be used in
production [...]&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;como-analizar-las-consultas-sql-que-esta-realizando-django&quot;&gt;

&lt;h2&gt;¿Cómo analizar las consultas SQL que está realizando Django?&lt;/h2&gt;

&lt;p&gt;Normalmente el primer paso para poder optimizar Django consiste en analizar
el número de consultas, así como los tiempos de ejecución de las mismas. Para
ello hay una extensión muy recomendable: &lt;b&gt;Django-debug-toolbar&lt;/b&gt;.&lt;br /&gt;
&lt;blockquote&gt;
&lt;i&gt;The Django Debug Toolbar is a configurable set of panels that display
various debug information about the current request/response and when
clicked, display more details about the panel’s content.&lt;/i&gt;
&lt;/blockquote&gt;
Lo ideal es poner esta app en desarrollo, y no en el despliegue final. Véase
la siguiente entrada&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;como-tener-diferentes-entornos-de-desarrollo-explotacion-pruebas&quot;&gt;

&lt;h2&gt;¿Cómo tener diferentes entornos de desarrollo/explotación/pruebas?&lt;/h2&gt;

&lt;p&gt;Mi solución actual, adaptada del muy recomendable
libro &lt;a class=&quot;reference external&quot; href=&quot;http://twoscoopspress.org/products/two-scoops-of-django-1-8&quot;&gt;Two Scoops of Django&lt;/a&gt;, consiste en tener un &lt;tt class=&quot;docutils literal&quot;&gt;settings.py&lt;/tt&gt;
que será el que se use en despliege y luego un fichero
&lt;tt class=&quot;docutils literal&quot;&gt;development.py&lt;/tt&gt;, que simplemente importa todo el contenido
del &lt;tt class=&quot;docutils literal&quot;&gt;settings.py&lt;/tt&gt; y realiza las modificaciones que crea oportunas.&lt;br /&gt;
Por ejemplo:&lt;br /&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;from main.settings import *

DEVELOPMENT = True

INSTALLED_APPS += (
    &#39;debug_toolbar&#39;,
    )
&lt;/pre&gt;
Para arrancar en desarrollo uso:&lt;br /&gt;
&lt;pre class=&quot;literal-block&quot;&gt;manage.py runserver --settings=main.development
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;como-hago-para-que-mi-metodo-booleano-se-vea-bonito-en-el-admin&quot;&gt;

&lt;h2&gt;¿Cómo hago para que mi método booleano se vea bonito en el admin?&lt;/h2&gt;

Esta documentado, pero a menudo resulta complicado de encontrar. Si escribimos
un método de un modelo que devuelve solo &lt;tt class=&quot;docutils literal&quot;&gt;True&lt;/tt&gt; o &lt;tt class=&quot;docutils literal&quot;&gt;False&lt;/tt&gt;, y lo consultamos
en el admin, este nos muestra texto. Sin embargo, para campos definidos como
booleanos (&lt;tt class=&quot;docutils literal&quot;&gt;BooleanField&lt;/tt&gt;) nos muestra un icono. Podemos hacer que utilice
esos mismos iconos si añadimos un atributo &lt;tt class=&quot;docutils literal&quot;&gt;boolean&lt;/tt&gt; al método.&lt;br /&gt;
por ejemplo:&lt;br /&gt;
&lt;pre class=&quot;literal-block&quot;&gt;def nacio_en_bisiesto(self):
    year = self.birthday.year
    return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0)

nacio_en_bisiesto.boolean = True
&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;section&quot; id=&quot;como-hago-para-mostrar-mi-propio-contenido-html-en-el-admin&quot;&gt;

&lt;h2&gt;¿Cómo hago para mostrar mi propio contenido html en el admin?&lt;/h2&gt;

&lt;p&gt;Para que el admin interprete cualquier texto producido por un método
como Html, sin escaparlo, debemos asignarle al método en cuestión
el atributo &lt;tt class=&quot;docutils literal&quot;&gt;allow_tag&lt;/tt&gt; a &lt;tt class=&quot;docutils literal&quot;&gt;True&lt;/tt&gt;. Es recomendable que nos escudemos
de posibles fallos de seguridad usando la función &lt;tt class=&quot;docutils literal&quot;&gt;format_html()&lt;/tt&gt; siempre
que incluyamos en la salida texto generado por el usuario final.&lt;br /&gt;
Por ejemplo:&lt;/p&gt;

&lt;pre class=&quot;literal-block&quot;&gt;def colored_name(self):
    return format_html(&#39;&amp;lt;span style=&quot;color: #{};&quot;&amp;gt;{} {}&amp;lt;/span&amp;gt;&#39;,
                    self.color_code,
                    self.first_name,
                    self.last_name)

colored_name.allow_tags = True
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/621025794274086482/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/621025794274086482' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/621025794274086482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/621025794274086482'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/10/recetas-habituales-en-django-que.html' title='Recetas Habituales en Django (Que siempre se me olvidan)'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-992539551059426543</id><published>2015-09-09T17:53:00.000+01:00</published><updated>2015-09-09T17:53:31.099+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="databases"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="hacklab"/><category scheme="http://www.blogger.com/atom/ns#" term="py3k"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="taller"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>Taller de Introducción a Django (Casi gratis...)</title><content type='html'>&lt;h1&gt;Taller Introducción a Django&lt;/h1&gt;

&lt;p&gt;En las instalaciones de Kreitek / El Andén
realizaremos un taller de introducción a 
Django.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Serán cuatro sesiones, las tardes de
los viernes, 25 de septiembre, y 2, 9 y 16 de 
octubre. las sesiones serán de unas tres horas, incluyendo un
descanso para que el personal no desfallezca.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Será necesario llevar un portátil, 
si puede ser al menos con &lt;a href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt; instalado.
Versión 2.7 o 3.4, la que se prefiera. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;El taller no es gratuito, valdrá 10€ para los 
no socios del andén y 5€ para los socios. La
totalidad del importe irá destinada Al Anden.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Durante el taller realizaremos una aplicación web
completa con &lt;em&gt;frontend&lt;/em&gt;, &lt;em&gt;backend&lt;/em&gt;, modelo de datos y 
servicios API REST. Se intentará dar 
una visión extensa de &lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;Django&lt;/a&gt;, aunque no 
podremos profundizar mucho en cada tema.&lt;/p&gt;

&lt;h2&gt;Más información aquí:&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://goo.gl/HI5MhV&quot;&gt;http://goo.gl/HI5MhV&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Pero... ¿Cómo se llega a El Taller K / El Andén?&lt;/h2&gt;

&lt;p&gt;Está perfectamente explicado aquí: &lt;a href=&quot;http://wiki.kreitek.org/kreitek:donde_estamos&quot;&gt;Taller Kreitek: Donde estamos&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Temario&lt;/h2&gt;

&lt;p&gt;Si se producen cambios en el mismo, los publicaremos en el 
enlace anterior, pero esto es lo que hay pensado por ahora:&lt;/p&gt;

&lt;h3&gt;Viernes 25, septiembre&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;Introducción a Django. Estructura de una aplicación web. 
  Frameworks web. Breve introducción a Python. Instalación 
  de Django. La estructura MVC (Modelo-Vista-Controlador). 
  Nuestro &quot;Hola, mundo&quot; en Django. Qué es una vista. El objeto
  &lt;code&gt;request&lt;/code&gt;. Presentación de la aplicación que vamos a 
  construir en el taller. Risas.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Viernes 2, octubre&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;Bases de datos. El modelo relacional. Normalización de bases 
  de datos relacionales. Modelos en Django. Campos. El mapeador 
  objeto-relacional en Django. Consultas sencillas a la 
  base de datos. Consultas no tan sencillas. SQL Crudo. 
  Señales y eventos. La aplicación &lt;code&gt;django.contrib.admin&lt;/code&gt;. 
  Modelos incluidos: Autentificación y usuarios, grupos, 
  mensajes. Agasajos y loas a los que no han abandonado
  después del primer día; técnicas de Vudú a lo que si.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Viernes 9, octubre&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;El sistema de plantillas. Etiquetas (&lt;code&gt;tags&lt;/code&gt;) y filtros
  (&lt;code&gt;filters&lt;/code&gt;). Limitaciones --intencionadas-- del sistema de
  plantillas. Herencia de plantillas. Sistema de carga de 
  plantillas. Creación de nuestras propias etiquetas y filtros.
  Adaptar un tema de Wordpress a Django. Uso de frameworks 
  como Bootstrap o Purecss. Formularios. Controles y widgets.
  Formularios desde modelos. Debate: &quot;Cuando usar Django
  y cuando no&quot;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;Viernes 16, octubre&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;Crear comandos de administración. Ficheros &lt;code&gt;urls.py&lt;/code&gt; 
  anidados. Cambios en el sistema de base de datos (&lt;code&gt;migrate&lt;/code&gt;).
  Vistas genéricas. Vistas basadas en clases. Generar
  contenidos que no son HTML. Crear una API Rest. Despliegue de 
  Django en explotación. Cachés y escalabilidad. Middleware. 
  Internacionalización. Tests con Django. Apps de django 
  recomendables. Té y pastas.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;Molón Cartel diseñado por &lt;a href=&quot;https://twitter.com/torehc20&quot;&gt;@torehc20&lt;/a&gt;&lt;/h2&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilw5PmOZO4Hv7BN8OcjoehZxNzXiE0OpOqmadZIfb2KJdrIU_cwjp5DE7EDxWZQh4ORHUuqzDP4Rbe7nwDjxgnH7b27EiEtKD2DDFYv9m03J62PqFZorq2M2dqqenzMjnTHgkU/s1600/cartel-taller-introduccion-django-2015.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilw5PmOZO4Hv7BN8OcjoehZxNzXiE0OpOqmadZIfb2KJdrIU_cwjp5DE7EDxWZQh4ORHUuqzDP4Rbe7nwDjxgnH7b27EiEtKD2DDFYv9m03J62PqFZorq2M2dqqenzMjnTHgkU/s400/cartel-taller-introduccion-django-2015.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/992539551059426543/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/992539551059426543' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/992539551059426543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/992539551059426543'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/09/taller-de-introduccion-django-casi.html' title='Taller de Introducción a Django (Casi gratis...)'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilw5PmOZO4Hv7BN8OcjoehZxNzXiE0OpOqmadZIfb2KJdrIU_cwjp5DE7EDxWZQh4ORHUuqzDP4Rbe7nwDjxgnH7b27EiEtKD2DDFYv9m03J62PqFZorq2M2dqqenzMjnTHgkU/s72-c/cartel-taller-introduccion-django-2015.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-9017238953481449492</id><published>2015-06-04T12:13:00.001+01:00</published><updated>2015-06-04T12:24:59.751+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cerveza"/><category scheme="http://www.blogger.com/atom/ns#" term="charlas"/><category scheme="http://www.blogger.com/atom/ns#" term="pyBirras"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Próxima PyBirras tenerife, el viernes, 4 de junio de 2015</title><content type='html'>&lt;p&gt;Este viernes, &lt;b&gt;5 de junio&lt;/b&gt;, a partir de las &lt;b&gt;19:00&lt;/b&gt;, tendremos una nueva reunión de &lt;b&gt;PyBirras Tenerife&lt;/b&gt;. Hablaremos, como siempre, de &lt;a href=&quot;http://www.python.org/&quot;&gt;Python&lt;/a&gt;, de &lt;a href=&quot;http://aguita.org/&quot;&gt;cervezas&lt;/a&gt;, de lo humano y de lo divino (por ese orden). Además, tendremos no una, ni dos, sino tres minicharlas:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.nltk.org/&quot;&gt;NTLK (Natural Language Toolkit)&lt;/a&gt;, por Hugo Jiménez Hernández&lt;/li&gt;

  &lt;li&gt;Control de acceso escolar mediante Python, por Sergio Delgado Quintero y David Armas Suárez&lt;/li&gt;

  &lt;li&gt;Introducción a &lt;a href=&quot;http://ipython.org/notebook.html&quot;&gt;iPython Notebook&lt;/a&gt;, por Juan Ignacio Rodríguez de León&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Esta vez nos han invitado a alojar la reunión el equipo de &lt;a href=&quot;http://gkowork.igk.es/es/&quot;&gt;&lt;b&gt;G·koworking&lt;/b&gt;&lt;/a&gt;, en La Laguna. El lugar es:&lt;/p&gt;

&lt;blockquote&gt;
Plaza San Honorato, 3, CP 38203&lt;br&gt;
La Laguna / Tenerife&lt;br&gt;
&lt;a href=&quot;http://bit.ly/1cXEsP9&quot;&gt;Mapa&lt;/a&gt;
&lt;/blockquote&gt;

&lt;p&gt;Es muy cerca del centro de La Laguna, a menos de 5 minutos de la última parada del tranvía en La Trinidad, en un emblemático local, que durante muchos años fue la &quot;Academia Lázaro&quot;.&lt;/p&gt;

&lt;p&gt;Como siempre, recordarles que la asistencia es totalmente gratuita, pero se agradecería confirmación de la asistencia, ya sea en el &lt;a href=&quot;http://www.meetup.com/es/Agile-Canarias/events/222785507/&quot;&gt;meetup del evento&lt;/a&gt;, o vía un twitter a &lt;a href=&quot;https://twitter.com/jileon/&quot;&gt;@jileon&lt;/a&gt;.
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/9017238953481449492/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/9017238953481449492' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/9017238953481449492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/9017238953481449492'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/06/proxima-pybirras-tenerife-el-viernes-4.html' title='Próxima PyBirras tenerife, el viernes, 4 de junio de 2015'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-7064490285354213723</id><published>2015-05-27T13:55:00.000+01:00</published><updated>2015-05-27T13:55:27.368+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="escepticismo"/><category scheme="http://www.blogger.com/atom/ns#" term="imágenes"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="MarcaEspaña"/><category scheme="http://www.blogger.com/atom/ns#" term="paridas"/><category scheme="http://www.blogger.com/atom/ns#" term="política"/><category scheme="http://www.blogger.com/atom/ns#" term="supervillanos"/><category scheme="http://www.blogger.com/atom/ns#" term="vendemotos"/><category scheme="http://www.blogger.com/atom/ns#" term="zasca"/><title type='text'>Resumen de política de la semana en curso</title><content type='html'>&lt;p&gt;Por fin vemos lo que había detrás de la fachada...&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-NcXTU71-O-QTz9EYVCtMY-pbEa92rtWnJvx2-N4cubxSZV1-RtGyiypL29c-4kMlKTLGXW6e4h-Gf-tkxMBZCrpnOfzrCEfJBWeijwdvWgEaaDbkpNUNVhDXAbE83Mjh6itC/s1600/leespe.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-NcXTU71-O-QTz9EYVCtMY-pbEa92rtWnJvx2-N4cubxSZV1-RtGyiypL29c-4kMlKTLGXW6e4h-Gf-tkxMBZCrpnOfzrCEfJBWeijwdvWgEaaDbkpNUNVhDXAbE83Mjh6itC/s1600/leespe.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;Visto en la lista de correo de Expatriados.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/7064490285354213723/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/7064490285354213723' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7064490285354213723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7064490285354213723'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/05/resumen-de-politica-de-la-semana-en.html' title='Resumen de política de la semana en curso'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-NcXTU71-O-QTz9EYVCtMY-pbEa92rtWnJvx2-N4cubxSZV1-RtGyiypL29c-4kMlKTLGXW6e4h-Gf-tkxMBZCrpnOfzrCEfJBWeijwdvWgEaaDbkpNUNVhDXAbE83Mjh6itC/s72-c/leespe.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-7230655990214361822</id><published>2015-03-10T12:00:00.001+00:00</published><updated>2015-03-10T12:00:39.731+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buena vida"/><category scheme="http://www.blogger.com/atom/ns#" term="ElAnden"/><category scheme="http://www.blogger.com/atom/ns#" term="hacklab"/><category scheme="http://www.blogger.com/atom/ns#" term="jodía informática"/><category scheme="http://www.blogger.com/atom/ns#" term="pincho tortilla"/><category scheme="http://www.blogger.com/atom/ns#" term="py3k"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Próxima PyBirras tenerife - Viernes, 13, en el Andén sin Límite</title><content type='html'>&lt;p&gt;Este próximo viernes vamos a realizar el tercer encuentro PyBirras. Las PyBirras son reuniones informales en la que hablamos de programación en 
general y del &lt;a href=&quot;http://www.python.org/&quot;&gt;lenguaje Python&lt;/a&gt; en particular. Y beberemos cervezas artesanales canarias
 (solo si quieres, no es obligatorio [Pero está muy rica]).&lt;/p&gt;

&lt;p&gt;
En esta reunión hablaremos de las charlas que más nos impactaron en 
la última PyConEs, y de algunos desarrollos interesantes hechos en El 
Anden. Y de la vida, el Universo y lo demás.&lt;/p&gt;
 
&lt;p&gt;La asistencia es totalmente gratuita, pero si que te agradecería que 
confirmaras la asistencia en este meetup:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.meetup.com/Agile-Canarias/events/220564873/&quot;&gt;http://www.meetup.com/Agile-Canarias/events/220564873/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;o vía un twitter a &lt;a href=&quot;https://twitter.com/jileon&quot;&gt;@jileon&lt;/a&gt;.&lt;/p&gt;
 
&lt;blockquote&gt;&lt;b&gt;&lt;big&gt;
PyBirras Tenerife
&lt;br&gt;Viernes 13 de marzo de 2015
&lt;br&gt;18:30 hasta 20:00
&lt;br&gt;Anden Sin límite
&lt;br&gt;Carretera Cuesta Taco, 67, Santa Cruz de Tenerife
&lt;/big&gt;&lt;/b&gt;&lt;/blockquote&gt;

&lt;p&gt;Después del evento proyectaremos, para el que quiera quedarse, el documental &lt;b&gt;&lt;a href=&quot;http://buy.indiegamethemovie.com/&quot;&gt;Indie Game: The Movie&lt;/a&gt;&lt;/b&gt;. Y pediremos pizza. Y más cervezas.&lt;p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHvzI1Bgk0plLCgnI-ekfH9n4cxKtIOsmG8Vj_h3PlusVx8EIFX_LydcrHeObAnIu7q9izTtxqqx_-zGQNFdlKvPW3Q-WXSF1dgHR5s8l7m9mEiM7RfPFnBODJ3Y-Fh26v536z/s1600/PyBIrrasAnden.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHvzI1Bgk0plLCgnI-ekfH9n4cxKtIOsmG8Vj_h3PlusVx8EIFX_LydcrHeObAnIu7q9izTtxqqx_-zGQNFdlKvPW3Q-WXSF1dgHR5s8l7m9mEiM7RfPFnBODJ3Y-Fh26v536z/s400/PyBIrrasAnden.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/7230655990214361822/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/7230655990214361822' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7230655990214361822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7230655990214361822'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/03/proxima-pybirras-tenerife-viernes-13-en.html' title='Próxima PyBirras tenerife - Viernes, 13, en el Andén sin Límite'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHvzI1Bgk0plLCgnI-ekfH9n4cxKtIOsmG8Vj_h3PlusVx8EIFX_LydcrHeObAnIu7q9izTtxqqx_-zGQNFdlKvPW3Q-WXSF1dgHR5s8l7m9mEiM7RfPFnBODJ3Y-Fh26v536z/s72-c/PyBIrrasAnden.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-6443966540720685242</id><published>2015-02-16T22:27:00.000+00:00</published><updated>2015-02-16T22:27:37.764+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Big Culo Day"/><category scheme="http://www.blogger.com/atom/ns#" term="paridas"/><title type='text'>Si hoy es 16 de febrero, esto es ... Big Culo Day 2015</title><content type='html'>La edición anterior no pude participar y me pasé el resto del año arrepentido, esta vez no se repetirá. Con ustedes mi aportación al &lt;a href=&quot;http://jotacedt.blogspot.com.es/2015/02/feliz-big-culo-day-2015.html&quot;&gt;Big Culo Day 2015&lt;/a&gt;: el genial &lt;a href=&quot;http://es.wikipedia.org/wiki/Vittorio_Giardino&quot;&gt;&lt;b&gt;Vittorio Giardino&lt;/b&gt;&lt;/a&gt; y uno de los culos más redondos de la historia del Comic, Little Ego:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Y7My8Auy3cD9K490TutfHZE1f0EyjSuYv9OniRDW_eto8Wp8fmGwwWKQ5YnrqgQw72wFJ5U7E8P0TEMPMVRVHZfwMhkNGhdRLL3S7qFJ_HVpytH4H_5ANy1d3fxsvljzt4BY/s1600/Giardino-Ego-01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Y7My8Auy3cD9K490TutfHZE1f0EyjSuYv9OniRDW_eto8Wp8fmGwwWKQ5YnrqgQw72wFJ5U7E8P0TEMPMVRVHZfwMhkNGhdRLL3S7qFJ_HVpytH4H_5ANy1d3fxsvljzt4BY/s400/Giardino-Ego-01.jpg&quot; height=&quot;640&quot; width=&quot;441&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Extra Bonus: Un boceto de &lt;a href=&quot;http://es.wikipedia.org/wiki/Milo_Manara&quot;&gt;&lt;b&gt;Milo Manara&lt;/b&gt;&lt;/a&gt; de la famosa pose de SpiderWoman, vista desde desde otro ángulo, demostrando una vez más que la lujuria no está solo en el ojo que ve, también está en el punto de mira.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcdy69geVSccJhscjlZcCqCi8c8iAYZhlKpGmzSF4T5ZHqHMbDc0g1W1M-qAYRC1GUc2wUbe3TNu7IU2ovaPwPMkbHkuGF8TKeJT4_e6E9f3sPeF9xarSGk7uRYQq_AE0U3OYQ/s1600/spider-woman-manara-responde.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcdy69geVSccJhscjlZcCqCi8c8iAYZhlKpGmzSF4T5ZHqHMbDc0g1W1M-qAYRC1GUc2wUbe3TNu7IU2ovaPwPMkbHkuGF8TKeJT4_e6E9f3sPeF9xarSGk7uRYQq_AE0U3OYQ/s400/spider-woman-manara-responde.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/6443966540720685242/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/6443966540720685242' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6443966540720685242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6443966540720685242'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/02/si-hoy-es-16-de-febrero-esto-es-big.html' title='Si hoy es 16 de febrero, esto es ... Big Culo Day 2015'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_Y7My8Auy3cD9K490TutfHZE1f0EyjSuYv9OniRDW_eto8Wp8fmGwwWKQ5YnrqgQw72wFJ5U7E8P0TEMPMVRVHZfwMhkNGhdRLL3S7qFJ_HVpytH4H_5ANy1d3fxsvljzt4BY/s72-c/Giardino-Ego-01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-4593281896313015862</id><published>2015-02-05T14:15:00.000+00:00</published><updated>2015-02-05T14:47:55.223+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="databases"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="english"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Django Tip: Modify the generated SQL statement of a queryset</title><content type='html'>&lt;div style=&quot;width: 420px; float:right; border: 1px solid #666; background: #FFF; padding: 10px; margin: 10px;&quot;&gt;

&lt;p&gt;This is my first post in english. I&#39;m doing this as a way to improve my English. If you see something wrong or strange in this article, I&#39;ll be pleased if you point it in the comments. Thank you very much in advance.&lt;/p&gt;

&lt;p&gt;Nota: Hay una versión en español de este artículo aquí: &lt;a href=&quot;/2015/02/django-tip-modificar-la-sentencias-sql.html&quot;&gt;Django Tip: Modificar la sentencias SQL generada por un queryset&lt;/a&gt;.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; method of the &lt;tt class=&quot;docutils literal&quot;&gt;queryset&lt;/tt&gt; objects allows us to add
some modifications to the SQL statement it will use. Specifically,
&lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; can be used to add new fields to the &lt;tt class=&quot;docutils literal&quot;&gt;Select&lt;/tt&gt; clause,
add Tables or Joins to the &lt;tt class=&quot;docutils literal&quot;&gt;From&lt;/tt&gt; clause, and/or add new
conditions to the &lt;tt class=&quot;docutils literal&quot;&gt;Order By&lt;/tt&gt; clause.&lt;/p&gt;
&lt;p&gt;Suppose we have the usual sock of items for sale, something like that:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
class Item(Model):
    id = AutoField(primary_key=True)  # I like to specify the Id.
    description = CharField(max_length=200)
    price = DecimalField(max_digits=12, decimal_places=2)
    created_at = DateTimeField(auto_now_add=True)
&lt;/pre&gt;
&lt;p&gt;We can add a calculated field, just to distinct between items
with prices below 5 € of items with a higher price (maybe we want to
stamp a &lt;em&gt;low-price&lt;/em&gt; icon on the result page, for example). We can
use the &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; method to add a new calculated field, named &amp;quot;low_price&amp;quot;, with
the following code:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={&#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;}).all()
&lt;/pre&gt;
&lt;p&gt;Under the hood, what we are doing is transforming the Django generated
SQL statement from this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
SELECT app_item.*
  FROM app_item;
&lt;/pre&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
SELECT app_item.*, (pvp &amp;lt;= 5.0) AS low_price
  FROM app_item;
&lt;/pre&gt;
&lt;p&gt;We can add many different calculated fields, either using the dictionary passed
as the value of the &lt;tt class=&quot;docutils literal&quot;&gt;select&lt;/tt&gt; parameter, or making several calls to the
&lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; method. For example, if we want to classify the items on three
divisions (cheap, under 5€; medium, between 5€ and 100€; and expensive, above
100€), we may do something like this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={
    &#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;,
    &#39;mid_price&#39;:&#39;pvp between 5.0 and 100.0&#39;,
    &#39;low_price&#39;:&#39;pvp &amp;gt; 100.0&#39;,
    }).all()
&lt;/pre&gt;
&lt;p&gt;or this other way:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects  \
    .extra(select={&#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;})  \
    .extra(select={&#39;mid_price&#39;:&#39;pvp between 5.0 and 100.0&#39;}) \
    .extra(select={&#39;low_price&#39;:&#39;pvp &amp;gt; 100.0&#39;})  \
    .all()
&lt;/pre&gt;
&lt;p&gt;Result must be the same in either case.&lt;/p&gt;
&lt;p&gt;Reality is that we can get this data with a really simple method on the &lt;tt class=&quot;docutils literal&quot;&gt;Item&lt;/tt&gt;
class, but in some cases, it could be very useful to make the Database do the
calculations for us.&lt;/p&gt;
&lt;p&gt;Clearly, we can add subqueries as new fields in the &lt;tt class=&quot;docutils literal&quot;&gt;select&lt;/tt&gt; clause, which
increase the possibilities. As an example, suppose our application
have a model to store the ratings our clients give to our products, something
like this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
class Score(models.Model):
    id = AutoField(primary_key=True)  # Yes, I know, It&#39;s needless...
    item = ForeignKey(Item)
    rate = SmallIntegerField()
&lt;/pre&gt;
&lt;p&gt;We can do a search over our stock, adding the mean rate of every product,
calculated by the database itself:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={
    &#39;mean_rate&#39;:&#39;&#39;&#39;
        SELECT AVG(app_score.rate)
          FROM app_score
         WHERE app_score.item_id = app_item.id
         &#39;&#39;&#39;
    }).all()
&lt;/pre&gt;
&lt;p&gt;We can do the same in our Django Code, writing a simple method in the &lt;tt class=&quot;docutils literal&quot;&gt;Item&lt;/tt&gt;
class. But we need a  new SQL query to get all the scores of an item, and
calculating the average after that.&lt;/p&gt;
&lt;p&gt;If we obtain 10 items as a result, for example, we will count up to 11 sql
queries to the Database, one for the original search, and one for every item in
the result, to get the list of scores. And we have to make the calculation
ourself. If we let  the Database to make the operation for us, we will count
just one SQL query. The difference in performance can be noticeable.&lt;/p&gt;
&lt;p&gt;Beware this techniques have a dangerous face: we have linked our code to the
Database management system more strongly. That implies more dependencies and
more danger. If we use proprietary extensions to the SQL syntax, we got a
potential break point. Even a simple call to get the current timestamp -Every
Database define his own names: &lt;tt class=&quot;docutils literal&quot;&gt;sysdate&lt;/tt&gt; in Oracle, &lt;tt class=&quot;docutils literal&quot;&gt;now()&lt;/tt&gt; in postgreSQL,
&lt;tt class=&quot;docutils literal&quot;&gt;current_timestamp&lt;/tt&gt; in Microsoft SQL  Server, to name just a few- will break
if we migrate to another database brand.&lt;/p&gt;
&lt;p&gt;Nevertheless, it&#39;s useful to known that we have this ability. It depends of
ourselves to use it or not. Just remember this three little advices:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Explicit is better than implicit. (Tim Peters)&lt;/li&gt;
&lt;li&gt;Special cases aren&#39;t special enough to break the rules
... Although practicality beats purity. (Tim Peters)&lt;/li&gt;
&lt;li&gt;With great power comes great responsibility (Benjamin Parker)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note: the use of &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; to modify the &lt;tt class=&quot;docutils literal&quot;&gt;FROM&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;WHERE&lt;/tt&gt; clauses is
better explained, among other interesting information, in the
official docs: &lt;a class=&quot;reference external&quot; href=&quot;https://docs.djangoproject.com/en/1.7/ref/models/querysets/#extra&amp;quot;&quot;&gt;Django Query Set API reference - extra&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/4593281896313015862/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/4593281896313015862' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4593281896313015862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/4593281896313015862'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/02/django-tip-modify-generated-sql.html' title='Django Tip: Modify the generated SQL statement of a queryset'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-3367687486897789076</id><published>2015-02-05T14:10:00.000+00:00</published><updated>2015-02-05T14:22:20.111+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="databases"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="django"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="trucos"/><title type='text'>Django Tip: Modificar la sentencias SQL generada por un queryset</title><content type='html'>&lt;p&gt;Note: There is a english version of this post here: &lt;a href=&quot;/2015/02/django-tip-modify-generated-sql.html&quot;&gt;Django Tip: Modify the generated SQL statement of a queryset&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;El método &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; de los &lt;tt class=&quot;docutils literal&quot;&gt;queryset&lt;/tt&gt; nos permite realizar algunas
modificaciones en las sentencias sql que ejecuta. En concreto nos permite añadir
campos a la cláusula &lt;tt class=&quot;docutils literal&quot;&gt;SELECT&lt;/tt&gt;, o tablas y &lt;em&gt;joins&lt;/em&gt; a la cláusula &lt;tt class=&quot;docutils literal&quot;&gt;FROM&lt;/tt&gt;, o
condiciones a la cláusula &lt;tt class=&quot;docutils literal&quot;&gt;ORDER BY&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Supongamos, por ejemplo, que tenemos una tabla de productos a la venta, algo como
esto:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
class Item(Model):
    id = AutoField(primary_key=True)  # Me gusta especificar la clave
    descripcion = CharField(max_length=200)
    pvp = DecimalField(max_digits=12, decimal_places=2)
    alta = DateTimeField(auto_now_add=True)
&lt;/pre&gt;
&lt;p&gt;Podemos añadir un campo calculado que nos indique si los precios son
inferiores a 5.0 (quizá queremos marcar estos productos en la página
con un icono de &amp;quot;&lt;em&gt;low-price&lt;/em&gt;&amp;quot;, por ejemplo). Para ello, podemos añadir un campo
calculado al &lt;tt class=&quot;docutils literal&quot;&gt;select&lt;/tt&gt;
de la &lt;em&gt;query&lt;/em&gt; usando &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt;, como en el siguiente ejemplo:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={&#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;}).all()
&lt;/pre&gt;
&lt;p&gt;Lo que estamos haciendo es que la sentencia SQL generada por Django pase
de esto:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
SELECT app_item.*
  FROM app_item;
&lt;/pre&gt;
&lt;p&gt;a esto:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
SELECT app_item.*, (pvp &amp;lt; 5.0) AS low_price
  FROM app_item;
&lt;/pre&gt;
&lt;p&gt;Podemos pasar varios campos calculados en el diccionario especificado  por el
parámetro &lt;tt class=&quot;docutils literal&quot;&gt;select&lt;/tt&gt;, o hacer varias llamadas a &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt;. Por ejemplo, si
queremos clasificar los precios en tres bandas, (baratos, por debajo de 5 euros;
medios, entre 5 y 100 euros y caros, por encima de 100 euros), podemos hacerlos
así:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={
    &#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;,
    &#39;mid_price&#39;:&#39;pvp between 5.0 and 100.0&#39;,
    &#39;low_price&#39;:&#39;pvp &amp;gt; 100.0&#39;,
    }).all()
&lt;/pre&gt;
&lt;p&gt;O así:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects  \
    .extra(select={&#39;low_price&#39;:&#39;pvp &amp;lt; 5.0&#39;})  \
    .extra(select={&#39;mid_price&#39;:&#39;pvp between 5.0 and 100.0&#39;}) \
    .extra(select={&#39;low_price&#39;:&#39;pvp &amp;gt; 100.0&#39;})  \
    .all()
&lt;/pre&gt;
&lt;p&gt;El resultado debería ser el mismo en los dos casos.&lt;/p&gt;
&lt;p&gt;Es verdad que podemos realizar este calculo de bandas de precios
en un simple método de la clase &lt;tt class=&quot;docutils literal&quot;&gt;Item&lt;/tt&gt;, pero en ocasiones
puede sernos útil o necesario que determinadas operaciones las haga la
base de datos por nosotros.&lt;/p&gt;
&lt;p&gt;Obviamente también podemos pasar subconsultas como campo añadido al
&lt;tt class=&quot;docutils literal&quot;&gt;select&lt;/tt&gt;, que nos da aun más posibilidades. Por ejemplo, supongamos que en
nuestra aplicación tiene otro modelo con las puntuaciones que nuestros
clientes asignan a nuestros artículos, algo como esto:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
class Score(models.Model):
    id = AutoField(primary_key=True)  # Si, ya lo sé, no hace falta...
    item = ForeignKey(Item)
    rate = SmallIntegerField()
&lt;/pre&gt;
&lt;p&gt;Podemos realizar una consulta sobre artículos e incorporar la puntuación media
de cada uno, calculada directamente por el gestor de la base de datos:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
Item.objects.extra(select={
    &#39;mean_rate&#39;:&#39;&#39;&#39;
        SELECT AVG(app_score.rate)
          FROM app_score
         WHERE app_score.item_id = app_item.id
         &#39;&#39;&#39;
    }).all()
&lt;/pre&gt;
&lt;p&gt;Si quisiéramos hacerlo desde Django, con un método de la clase &lt;tt class=&quot;docutils literal&quot;&gt;Item&lt;/tt&gt;, por
ejemplo, tendríamos que realizar primero una consulta para obtener todas las
puntuaciones de un artículo, y luego calcular la media.&lt;/p&gt;
&lt;p&gt;Si lo hacemos para una consulta cuyo resultado final fueran 10 artículos, por
ejemplo,  tendríamos que hemos realizado 11 consultas SQL a la base de datos,
haciendo además el cálculo nosotros, por una sola consulta, si los cálculos los
realiza el SGBD. La diferencia en rendimiento puede ser considerable.&lt;/p&gt;
&lt;p&gt;Estás prácticas también tienen su lado peligroso: hemos vinculado
más nuestro código al gestor de base de datos que estamos usando, con las
dependencias y peligro que eso conlleva. Si usamos extensiones
propietarias de la base de datos para realizar la consulta, aunque sea
algo tan simple como utilizar la marca de tiempo de la base de datos
(Que cada gestor se empeña en definir de forma diferente, &lt;tt class=&quot;docutils literal&quot;&gt;sysdate&lt;/tt&gt; en
Oracle, &lt;tt class=&quot;docutils literal&quot;&gt;now()&lt;/tt&gt; en postgreSQL, &lt;tt class=&quot;docutils literal&quot;&gt;current_timestamp&lt;/tt&gt; en Microsoft SQL
Server, por citar solo unos pocos ejemplos), ya tenemos un punto de ruptura
si pretendemos migrar de gestor.&lt;/p&gt;
&lt;p&gt;En cualquier caso, es útil saber que tenemos esta capacidad, ya depende de
nosotros si queremos emplearla o no. Recuerda solo estos tres consejos:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Explícito mejor que implícito (Tim Peters)&lt;/li&gt;
&lt;li&gt;Los casos especiales no son tan especiales como para
romper las reglas ... pero lo práctico vence a lo ideal (Tim Peters)&lt;/li&gt;
&lt;li&gt;Todo gran poder conlleva una gran responsabilidad (Benjamin Parker)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nota: El uso de &lt;tt class=&quot;docutils literal&quot;&gt;extra&lt;/tt&gt; para modificar las cláusulas &lt;tt class=&quot;docutils literal&quot;&gt;FROM&lt;/tt&gt; y &lt;tt class=&quot;docutils literal&quot;&gt;WHERE&lt;/tt&gt; está
explicado, junto con muchas otras cosas interesantes, en la
documentación oficial: &lt;a class=&quot;reference external&quot; href=&quot;https://docs.djangoproject.com/en/1.7/ref/models/querysets/#extra&quot;&gt;Django Query Set API reference - extra&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/3367687486897789076/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/3367687486897789076' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3367687486897789076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3367687486897789076'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/02/django-tip-modificar-la-sentencias-sql.html' title='Django Tip: Modificar la sentencias SQL generada por un queryset'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-3340787452650016965</id><published>2015-01-29T11:11:00.002+00:00</published><updated>2015-01-29T11:30:10.546+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="batallitas"/><category scheme="http://www.blogger.com/atom/ns#" term="cada vez más cabreado"/><category scheme="http://www.blogger.com/atom/ns#" term="dinosaurio"/><category scheme="http://www.blogger.com/atom/ns#" term="división de poderes"/><category scheme="http://www.blogger.com/atom/ns#" term="elecciones"/><category scheme="http://www.blogger.com/atom/ns#" term="malaprensa"/><category scheme="http://www.blogger.com/atom/ns#" term="MarcaEspaña"/><category scheme="http://www.blogger.com/atom/ns#" term="política"/><category scheme="http://www.blogger.com/atom/ns#" term="prensa"/><title type='text'>A quien critica a Siriza por no poner mujeres en su gobierno.</title><content type='html'>&lt;p&gt;Reconozco que tengo un problema con la prensa de este país: No me creo su independencia.&lt;/p&gt;

&lt;p&gt;La última patochada son las airadas protestas porque el nuevo gobierno de Grecia no cuenta con mujeres entre sus miembros. Que haya subido el salario mínimo o haya garantizado la electricidad a los más pobres no importa. Peor aun, es &lt;i&gt;populista&lt;/i&gt;. Permitidme que os lo diga: ¡Qué falso os queda!&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;¿Sabes cuántas mujeres había en el gobierno anterior de Grecia? ¿Y en el anterior a este? ¿Y en el anterior al anterior a este?
    (&lt;i&gt;Spoiler alert:&lt;/i&gt; Más bien tirando a pocas tirando a ninguna).&lt;/li&gt;

&lt;br&gt;

    &lt;li&gt;¿Por qué no os preocupó &lt;b&gt;ENTONCES&lt;/b&gt;? ¿Dónde estaba vuestra justa ira? ¿Cómo se os pudo pasar tan por alto como para no denunciarlo NI UNA SOLA VEZ?&lt;/li&gt;

&lt;br&gt;
    &lt;li&gt;¿Cuantas mujeres hay ahora mismo en el Gobierno de EEUU?
    (&lt;i&gt;Spoiler alert:&lt;/i&gt; Una. En un ministerio de chichinabo, por cierto)&lt;/li&gt;

&lt;br&gt;

    &lt;li&gt;¿Por qué no os preocupa &lt;b&gt;AHORA&lt;/b&gt;? ¿Por qué no os rasgáis las vestiduras por el machismo patriarcalista de Obama?&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Son preguntas sencillas pero no os preocupéis, ya contesto yo por vosotros: La república Griega y su gobierno os chupa un pie. La igualdad de la mujer os importa tres cominos. La &lt;a href=&quot;http://es.wikipedia.org/wiki/Equidad&quot;&gt;Equidad&lt;/a&gt; os la &lt;i&gt;refinfanfinfla&lt;/i&gt; pero bien. No sois más hipócritas porque no entrenáis.&lt;/p&gt;

&lt;p&gt;En resumen: No cuela.&lt;/p&gt;

&lt;p&gt;PD: De propina, un pequeño cuento (&lt;i&gt;after&lt;/i&gt; &lt;a href=&quot;http://es.wikipedia.org/wiki/Augusto_Monterroso&quot;&gt;Augusto Monterroso&lt;/a&gt;):&lt;/p&gt;

&lt;blockquote&gt;
    Cuando el dinosaurio despertó, Podemos seguía allí.
&lt;/blockquote&gt;

&lt;p&gt;PD2: Cuando hablo de prensa, no incluyo a artefactos bélicos como La Razón, Libertad Digital y similares, manojos de papeles/bits juntados al tuntún para hacer bulto y  mantener la ilusión entre los más adoctrinados, medios comprados (y vendidos) desde su mismo nacimiento. Hablo de cabeceras con bagaje histórico, como El País, ABC o El Mundo (No enlazo porque ahora es delito, se siente). Los que ahora agachan la cabeza y obedecen prestos la voz de su amo, mientras se quejan de que las ventas en papel bajan. Y se pregunta el porqué.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;







</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/3340787452650016965/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/3340787452650016965' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3340787452650016965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/3340787452650016965'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/01/a-quien-critica-siriza-por-no-poner.html' title='A quien critica a Siriza por no poner mujeres en su gobierno.'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-8723998177424221844</id><published>2015-01-29T09:15:00.001+00:00</published><updated>2015-01-29T09:15:35.330+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MarcaEspaña"/><category scheme="http://www.blogger.com/atom/ns#" term="política"/><category scheme="http://www.blogger.com/atom/ns#" term="wtf"/><title type='text'>La auténtica #MarcaEspaña de Rajoy:  Spain WTF</title><content type='html'>&lt;p&gt;No creo que la foto sea real...&lt;sup&gt;*&lt;/sup&gt;&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgMlpg_1RCjyGD3AvEATEIMOeSZT0zqmnQ4JCEpNzikCPO_TvtpTv5-Z2au3XL69EHvEJD49WQp8k1Hb7QiydsBFheI5aNB1idRjFUYKm7V67M3jXakKVWOxhNlJqZuk-_8ieP/s1600/spainwtf.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgMlpg_1RCjyGD3AvEATEIMOeSZT0zqmnQ4JCEpNzikCPO_TvtpTv5-Z2au3XL69EHvEJD49WQp8k1Hb7QiydsBFheI5aNB1idRjFUYKm7V67M3jXakKVWOxhNlJqZuk-_8ieP/s1600/spainwtf.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;... pero quizá sea el origen de un nuevo y exitoso Hashtag: &lt;b&gt;&lt;tt&gt;#SpainWTF&lt;/tt&gt;&lt;/b&gt; &lt;/p&gt;

&lt;p&gt;&lt;sup&gt;*&lt;/sup&gt;No voy ni a molestarme en comprobarlo.&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/8723998177424221844/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/8723998177424221844' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/8723998177424221844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/8723998177424221844'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2015/01/la-autentica-marcaespana-de-rajoy-spain.html' title='La auténtica #MarcaEspaña de Rajoy:  Spain WTF'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgMlpg_1RCjyGD3AvEATEIMOeSZT0zqmnQ4JCEpNzikCPO_TvtpTv5-Z2au3XL69EHvEJD49WQp8k1Hb7QiydsBFheI5aNB1idRjFUYKm7V67M3jXakKVWOxhNlJqZuk-_8ieP/s72-c/spainwtf.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-439546586550403543</id><published>2014-06-04T10:31:00.002+01:00</published><updated>2014-06-04T10:31:52.047+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="canarias"/><category scheme="http://www.blogger.com/atom/ns#" term="cerveza"/><category scheme="http://www.blogger.com/atom/ns#" term="charlas"/><category scheme="http://www.blogger.com/atom/ns#" term="pincho tortilla"/><category scheme="http://www.blogger.com/atom/ns#" term="py3k"/><category scheme="http://www.blogger.com/atom/ns#" term="pyBirras"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Segunda reunión PyBirras/Tenerife</title><content type='html'>&lt;p&gt;Mañana (5/junio/2014) tendremos la segunda reunión de PyBirras Tenerife. Será a partir de las 7 de la tarde en el Café Teatro 7. Si te animas a ir, apúntate en esta página de &lt;i&gt;Meetup&lt;/i&gt; que el equipo de &lt;a href=&quot;http://www.meetup.com/Agile-Canarias/&quot;&gt;Agile Canarias&lt;/a&gt; nos ha prestado:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;a href=&quot;http://www.meetup.com/Agile-Canarias/events/184537892/&quot;&gt;http://www.meetup.com/Agile-Canarias/events/184537892/&lt;/a&gt;
&lt;/blockquote&gt;

&lt;p&gt;En principio la idea es tomarnos unas cervezas y hacer tres breves presentaciones (aproximadamente de 10 minutos) sobre los siguientes temas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Guía de supervivencia para Python3.4 (por &lt;a href=&quot;https://twitter.com/jileon&quot;&gt;Juan Ignacio&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;SublimeText3; IDE Python (por &lt;a href=&quot;https://twitter.com/monobotBlog&quot;&gt;Héctor&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Testing de aplicaciones en Django (por &lt;a href=&quot;https://twitter.com/esauro&quot;&gt;Esaú&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/439546586550403543/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/439546586550403543' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/439546586550403543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/439546586550403543'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2014/06/segunda-reunion-pybirrastenerife.html' title='Segunda reunión PyBirras/Tenerife'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-6124490503485214435</id><published>2014-05-29T14:34:00.000+01:00</published><updated>2014-05-29T14:34:45.424+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buena vida"/><category scheme="http://www.blogger.com/atom/ns#" term="cine"/><category scheme="http://www.blogger.com/atom/ns#" term="corto"/><category scheme="http://www.blogger.com/atom/ns#" term="cultura"/><category scheme="http://www.blogger.com/atom/ns#" term="estrellas"/><category scheme="http://www.blogger.com/atom/ns#" term="imprescindible"/><category scheme="http://www.blogger.com/atom/ns#" term="LipDub"/><category scheme="http://www.blogger.com/atom/ns#" term="música"/><category scheme="http://www.blogger.com/atom/ns#" term="tenerife"/><category scheme="http://www.blogger.com/atom/ns#" term="video"/><category scheme="http://www.blogger.com/atom/ns#" term="YouTube"/><title type='text'>Lipdub del Colegio Nuryana 2014</title><content type='html'>&lt;p&gt;Cuando veo que hacen estas cosas en el colegio donde tengo a mis retoños se me pone un nudo en la garganta...&lt;/p&gt;

&lt;div style=&quot;text-align:center&quot;&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/guM63dJyYD4&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;En fin, ¡Absolutamente Awesomico! Se me han rallado los ojos, pero debe ser por la cebolla que estoy picando, ojo.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/6124490503485214435/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/6124490503485214435' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6124490503485214435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/6124490503485214435'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2014/05/lipdub-del-colegio-nuryana-2014.html' title='Lipdub del Colegio Nuryana 2014'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-5458051512762891807</id><published>2014-05-09T10:42:00.002+01:00</published><updated>2014-05-09T10:42:41.378+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="agile"/><category scheme="http://www.blogger.com/atom/ns#" term="canarias"/><category scheme="http://www.blogger.com/atom/ns#" term="charlas"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo"/><category scheme="http://www.blogger.com/atom/ns#" term="kanban"/><category scheme="http://www.blogger.com/atom/ns#" term="tenerife"/><category scheme="http://www.blogger.com/atom/ns#" term="ull"/><title type='text'>¡A todo Kanban! Una introducción a Kanban</title><content type='html'>&lt;p&gt;El &lt;span title=&quot;7/mayo/2014&quot;&gt;otro día&lt;/span&gt; di una pequeña &lt;a href=&quot;http://www.meetup.com/Agile-Canarias/events/180040402/&quot;&gt;introducción a la herramienta Kanban&lt;/a&gt;, gracias al grupo de &lt;a href=&quot;http://www.meetup.com/Agile-Canarias/&quot;&gt;Agile Canarias&lt;/a&gt;. Esta es la presentación que utilicé, con un par de correcciones y añadiendo dos páginas nuevas con referencias a algunas herramientas software y &lt;i&gt;add-ons&lt;/i&gt; para implementar Kanban de forma digital (Aunque sigo recomendado empezar con la combinación baja tecnología/bajo coste: un tablero o pizarra de ikea, cinta adhesiva y notas &lt;i&gt;Post-it&lt;/i&gt;)&lt;/p&gt;

&lt;div style=&quot;text-align: center&quot;&gt;

&lt;iframe src=&quot;http://www.slideshare.net/slideshow/embed_code/34473567&quot; width=&quot;512&quot; height=&quot;421&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; style=&quot;border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;&quot; allowfullscreen&gt; &lt;/iframe&gt; &lt;div style=&quot;margin-bottom:5px&quot;&gt; &lt;strong&gt; &lt;a href=&quot;https://www.slideshare.net/jileon/introduccion-a-kanban&quot; title=&quot;¡A todo Kanban! ~ Introducción a kanban&quot; target=&quot;_blank&quot;&gt;¡A todo Kanban! ~ Introducción a kanban&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/jileon&quot; target=&quot;_blank&quot;&gt;Juan Rodríguez&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;

&lt;/div&gt;

&lt;p&gt;Gracias a los asistentes, espero que les haya gustado la presentación y la pequeña actividad ludico-educativa del final :-)&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/5458051512762891807/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/5458051512762891807' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/5458051512762891807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/5458051512762891807'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2014/05/a-todo-kanban-una-introduccion-kanban.html' title='¡A todo Kanban! Una introducción a Kanban'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-2238817336372460074</id><published>2014-03-28T12:47:00.000+00:00</published><updated>2014-03-28T12:47:09.368+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buena vida"/><category scheme="http://www.blogger.com/atom/ns#" term="innovación"/><category scheme="http://www.blogger.com/atom/ns#" term="Start UP"/><category scheme="http://www.blogger.com/atom/ns#" term="SWTenerife"/><category scheme="http://www.blogger.com/atom/ns#" term="tenerife"/><title type='text'>Fui a la Tenerife Startup Weekend (Y gané un montón de amigos)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEier1k6zrKOsogN88h-XBNxB3HOJE-ZvoXEM5kcJs92LG1xiR4O7ezdslEw0_J0rpe7fqhp2PonT4GYFS0hSc7eUGJpTy9NoZJgYcft6Ho34Ioc6fzXwfucFbnCUie5LBNSbmtA/s1600/logoweb.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEier1k6zrKOsogN88h-XBNxB3HOJE-ZvoXEM5kcJs92LG1xiR4O7ezdslEw0_J0rpe7fqhp2PonT4GYFS0hSc7eUGJpTy9NoZJgYcft6Ho34Ioc6fzXwfucFbnCUie5LBNSbmtA/s1600/logoweb.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;El pasado fin de semana participé en la &lt;a
href=&quot;http://tenerife.startupweekend.org/&quot;&gt;&lt;b&gt;StartUp Weekend Tenerife&lt;/b&gt;&lt;/a&gt;,
segunda edición. Había quedado desconsolado por no participar en la primera,
así que, a pesar de tener muchísimo trabajo, a última hora me lié la manta a la
cabeza y me inscribí. La
suerte me sonrió y al final pude pasar todo el fin de semana asombrado de la
cantidad de talento, las ganas de trabajar, la abundancia de ideas y el
volumen de trabajo que se puede hacer en un fin de semana.&lt;/p&gt;

&lt;p&gt;Los ganadores de la presente edición son el equipo &lt;b&gt;Dtapapp&lt;/b&gt; (Ya los
puedes seguir en twitter: &lt;a href=&quot;https://twitter.com/dtapapp&quot;&gt;@dtapapp&lt;/a&gt;),
cuyo atractivo concepto es &lt;b&gt;La ruta de la tapa todo el año&lt;/b&gt;. Desde aquí
felicito al equipo por la cantidad de cosas que pudieron realizar, desde
pivotar de la idea original, que ciertamente no me parecía tan interesante, a
validar la propuesta, conseguir un ratio de conversiones altísimo, aun siendo
sábado, hacer una beta de la aplicación e incluso ejecutar una prueba real
¡Con cartel y todo! Para quitarse el sombrero. Sobra decir que desde aquí me
apunto como usuario en pruebas, creo que doy el perfil.&lt;/p&gt;

&lt;p&gt;El segundo premio fue para Gifteapp (&lt;a
href=&quot;https://twitter.com/Gifteapp&quot;&gt;@gitfapp&lt;/a&gt; en twitter), una aplicación
pensada para ayudarte a hacer el regalo perfecto, que me pareció muy
interesante por la parte de &lt;a
href=&quot;http://es.wikipedia.org/wiki/Inteligencia_artificial&quot;&gt;IA&lt;/a&gt; y &lt;a
href=&quot;http://es.wikipedia.org/wiki/Machine_learning&quot;&gt;aprendizaje
automático&lt;/a&gt; (&lt;i&gt;Machine Learning&lt;/i&gt;) que creí entender que se construiría
por detrás.&lt;/p&gt;

&lt;p&gt;El tercer premio fue para &lt;b&gt;Gamehab&lt;/b&gt;, (&lt;a
href=&quot;https://twitter.com/gamehab&quot;&gt;@gamehab&lt;/a&gt; en twitter), una aplicación
que consiste en una serie de ejercicios para la rehabilitación
de afectados por el &lt;a href=&quot;http://es.wikipedia.org/wiki/S%C3%ADndrome_del_t%
C3%BAnel_carpiano&quot;&gt;síndrome de túnel carpiano&lt;/a&gt;, aunque extensible a otras
dolencias. Me gustó mucho la forma en que enfocaron el retorno de
beneficios, habrá que ver si es o no factible. En cualquier caso, muy
interesante y personalmente creo que bastante viable.&lt;/p&gt;

&lt;p&gt;Otro proyecto muy interesante, que arrasó con el resto de premios, fue Seiku
(&lt;a href=&quot;https://twitter.com/SeikuTales&quot;&gt;@SeikuTales&lt;/a&gt; en Twitter), una
plataforma para crear historias interactivas, del estilo de los libros de &lt;a
href=&quot;http://es.wikipedia.org/wiki/Elige_tu_propia_aventura&quot;&gt;Elige tu propia
aventura&lt;/a&gt;, que se hicieron populares en la década de los 80, pero
actualizados a los tiempos modernos y con múltiples detalles que potencian la
idea. Además, tenían el logo más súper molón de todos, felicidades a la
diseñadora.&lt;/p&gt;

&lt;p&gt;Mi equipo era &lt;b&gt;3DAlize&lt;/b&gt; (&lt;a
href=&quot;https://twitter.com/3DAlize&quot;&gt;@3DAlize&lt;/a&gt; en twitter). Presentamos una
idea cuyo eslogan es &lt;b&gt;materializa tu  experiencia cultural&lt;/b&gt;. No ganamos ni
para pipas [&lt;i&gt;Yes, pun intended&lt;/i&gt;]. La competencia de verdad que era algo
serio. Además, me despisté con el tiempo de la presentación y no pudimos ni
enseñar el prototipo. Mea culpa. Aun sin ese fallo, no creo que hubiéramos
ganado, porque nos alejamos bastante de los parámetros fijados para el
concurso. Pero como dicen en mi pueblo, de todo se aprende. En cualquier caso,
no cambiaría nada de lo hecho en el fin de semana, tanto el brusco pivotaje
como la cantidad de ideas y conceptos con los que trabajamos. Además, el
equipo que me tocó era de auténtico lujo. Me lo pasé increíble todo el fin de
semana, aprendí un montón y conocí a muchísima gente nueva e interesante. No
se puede pedir más.&lt;/p&gt;

&lt;p&gt;Por supuesto, felicitar muy mucho al equipo que ha organizado la StartUp
Weekend Tenerife: La organización ha sido espléndida, el catering me sorprendió
muy positivamente, algo que no me extraña teniendo a un sibarita como &lt;a
href=&quot;https://twitter.com/xelso&quot;&gt;Jacob Rodríguez&lt;/a&gt; en el equipo, los
&lt;i&gt;coachers&lt;/i&gt; ayudaron y se comprometieron hasta el tuétano, &lt;a
href=&quot;http://twitter.com/luisparisc&quot;&gt;Luis Paris Carmona&lt;/a&gt;, por ejemplo, que
nos dio una charla durante la cena del primer día que nos dejó asombrados,
patidifusos y con ganas de más. Fue un descubrimiento el ver la seriedad, empeño e interés
que le puso a su trabajo el fotógrafo y realizador &lt;a href=&quot;https://twitter.com/iombigarcia&quot;&gt;Iombi 
García&lt;/A&gt; (Gracias por la foto del equipo), un auténtico puntal cuyo trabajo habrá 
que seguir muy de cerca. Lo mejor de todo, pude reencontrarme con gente
muy apreciada y físicamente dispersa, como &lt;a
href=&quot;https://twitter.com/RafaTorres&quot;&gt;Rafa Torres&lt;/a&gt; y &lt;a
href=&quot;https://twitter.com/dav_macias&quot;&gt;David Macias&lt;/a&gt;, lo que fue la guinda
del pastel.&lt;/p&gt;

&lt;p&gt;No sé si podré apuntarme el año que viene, pero seguro que lo intentaré. Y animo 
a todo el mundo a probar la experiencia; es un evento interesante para
cualquiera y seguro que lo vas a pasar mejor que viendo &lt;a
href=&quot;http://es.wikipedia.org/wiki/Coprolito&quot;&gt;Sálvame de Luxe&lt;/a&gt; en la
tele.&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/2238817336372460074/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/2238817336372460074' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/2238817336372460074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/2238817336372460074'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2014/03/fui-la-tenerife-startup-weekend-y-gane.html' title='Fui a la Tenerife Startup Weekend (Y gané un montón de amigos)'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEier1k6zrKOsogN88h-XBNxB3HOJE-ZvoXEM5kcJs92LG1xiR4O7ezdslEw0_J0rpe7fqhp2PonT4GYFS0hSc7eUGJpTy9NoZJgYcft6Ho34Ioc6fzXwfucFbnCUie5LBNSbmtA/s72-c/logoweb.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-7044517477410327969</id><published>2014-02-10T21:09:00.001+00:00</published><updated>2014-02-10T21:10:55.134+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="15m"/><category scheme="http://www.blogger.com/atom/ns#" term="2014"/><category scheme="http://www.blogger.com/atom/ns#" term="cada vez más cabreado"/><category scheme="http://www.blogger.com/atom/ns#" term="cine"/><category scheme="http://www.blogger.com/atom/ns#" term="machangadas"/><title type='text'>La Gran Estafa Española (Spanish Bisne)</title><content type='html'>&lt;p&gt;Cada vez que veo el cartel de la película &lt;a href=&quot;http://www.imdb.com/title/tt1800241/&quot;&gt;La Gran Estafa Americana&lt;/a&gt;, mi cerebro la reinterpreta así:&lt;/p&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/jileon/12442905823/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://farm3.staticflickr.com/2830/12442905823_0f17b69af8_z.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;(Si pinchas en la imagen podrás verla más grande en flickr)&lt;/p&gt;

&lt;p&gt;PD: Creo que la postura de chuloplaya de Wert le queda que ni pintada.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/7044517477410327969/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/7044517477410327969' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7044517477410327969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7044517477410327969'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2014/02/la-gran-estafa-espanola-spanish-bisne.html' title='La Gran Estafa Española (Spanish Bisne)'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-19840256.post-7982242805486803701</id><published>2013-12-05T13:07:00.000+00:00</published><updated>2013-12-05T13:07:18.032+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="absurdo"/><category scheme="http://www.blogger.com/atom/ns#" term="agarrate los machos"/><category scheme="http://www.blogger.com/atom/ns#" term="cada vez más cabreado"/><category scheme="http://www.blogger.com/atom/ns#" term="homeopatía"/><title type='text'>El FAQ definitivo sobre la Homeopatía</title><content type='html'>&lt;h2 style=&quot;text-align:center&quot;&gt;Todo lo que siempre quisiste saber sobre la homeopatía&lt;/H2&gt;
&lt;h2 style=&quot;text-align:center&quot;&gt;pero nunca llegaste a preguntar porque, siendo sinceros&lt;/H2&gt;
&lt;h2 style=&quot;text-align:center&quot;&gt;te importaba una mierda.&lt;/H2&gt;
&lt;h3 style=&quot;text-align:center&quot;&gt;¡En rigurosa exclusiva!&lt;/h3&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pregunta:&lt;/b&gt; ¿Funciona la homeopatía?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Respuesta:&lt;/b&gt; No
&lt;p&gt;&amp;nbsp;
&lt;p&gt;&lt;b&gt;Pregunta:&lt;/b&gt; ¿Pero y si ...?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Respuesta:&lt;/b&gt; Que no. Pesao.
&lt;p&gt;&amp;nbsp;&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://elornitorrincoenmascarado.blogspot.com/feeds/7982242805486803701/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/19840256/7982242805486803701' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7982242805486803701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/19840256/posts/default/7982242805486803701'/><link rel='alternate' type='text/html' href='http://elornitorrincoenmascarado.blogspot.com/2013/12/el-faq-definitivo-sobre-la-homeopatia.html' title='El FAQ definitivo sobre la Homeopatía'/><author><name>Ornitorrinco enmascarado</name><uri>http://www.blogger.com/profile/09217546834446481201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>