Browse Source

Finish presentation for PyCaxias 2020

master
Julio Biason 5 years ago
parent
commit
916f76b5b6
  1. BIN
      _images/chrysalis.jpeg
  2. BIN
      _images/fear.jpeg
  3. BIN
      _images/isso-nao-prova-nada.png
  4. BIN
      _images/oogway.jpeg
  5. 160
      pycaxias2020.html

BIN
_images/chrysalis.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
_images/fear.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
_images/isso-nao-prova-nada.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
_images/oogway.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

160
pycaxias2020.html

@ -234,6 +234,166 @@
A part of the main.</p>
<p>-- John Donne</p>
</section>
<section>
<h2>Type Hinting: Love it</h2>
</section>
<section>
<p>"Mas Python não tem tipos!"</p>
<pre class="fragment"><code data-trim>
In [1]: type(object)
Out[1]: type
</code></pre>
</section>
<section>
<img class="stretch" src="_images/isso-nao-prova-nada.png" alt="">
</section>
<section>
<pre><code data-trim>
In [4]: type("a")
Out[4]: str
In [5]: type(str)
Out[5]: type
</code></pre>
</section>
<section>
<pre><code data-trim>
def to_fahrenheit(temperature: int) -> int:
</code></pre>
</section>
<section>
<pre><code data-trim>
@dataclass
class Celcius:
temperature: int
def to_fahrenheit(temperature: Celcius) -> int:
</code></pre>
</section>
<section>
<h2>mypy</h2>
</section>
<section>
<img class="stretch" src="_images/tweet-python2020.png" alt="">
</section>
<section>
<h2>??</h2>
<p class="fragment">None-aware operator (PEP 505)</p>
<pre class="fragment"><code data-trim>
a ??= 'value'
</code></pre>
<pre class="fragment"><code data-trim>
a = a if a is not None else 'value'
</code></pre>
</section>
<section>
<h2>@</h2>
<p class="fragment">Dedicated infix operator for matrix multiplication (PEP 465)</p>
</section>
<section>
<h2>|</h2>
<p class="fragment">Union Operator to Dict (PEP 584)</p>
<pre class="fragment"><code data-trim>
dict1.update(dict2) # in-place
</code></pre>
<pre class="fragment"><code data-trim>
dict3 = dict1 | dict2
</code></pre>
<pre class="fragment"><code data-trim>
dict1 |= dict2 # same as .update()
</code></pre>
</section>
<section>
<h2>:=</h2>
<p class="fragment">Assignment Operator (PEP 572)</p>
<pre class="fragment"><code data-trim>
while chunk := file.read(8192):
process(chunk)
</code></pre>
</section>
<section>
<h2>@dict[key].attr[0].decorator</h2>
<p class="fragment">Relaxing Grammar Restrictions On Decorators (PEP 614)</p>
</section>
<section>
<h2>Steering Council <span class="fragment"> 🤔 </span></h2>
</section>
<section>
<h3>Python Positional-Only Parameters (PEP 570)</h3>
<pre><code data-trim>
pow(x, y, z=None, /)
...
&gt;&gt;&gt; pow(x=5, y=3)
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: pow() takes no keyword arguments
</code></pre>
</section>
<section>
<p>"Without the ability to specify which parameters are
positional-only, library authors must be careful when
choosing appropriate parameter names."</p>
<h1 class="fragment">🤦</h1>
</section>
<section>
<img class="stretch" src="_images/chrysalis.jpeg" alt="">
</section>
<section>
<img class="stretch" src="_images/oogway.jpeg" alt="">
</section>
<section>
<img class="stretch" src="_images/fear.jpeg" alt="">
</section>
<section>
<h1>??</h1>
</section>
<section data-background='_images/thats-all-folks.jpg'>
<div class="semi-opaque">
<ul class="empty">
<li><a href="https://functional.cafe/@juliobiason">https://functional.cafe/@juliobiason</a></li>
<li><a href="https://t.me/juliobiason">https://t.me/juliobiason</a></li>
<li>julio.biason@pm.me</li>
<li><a href="http://presentations.juliobiason.net">http://presentations.juliobiason.net</a></li>
</ul>
</div>
</section>
</div>
</div>

Loading…
Cancel
Save