diff --git a/_images/chrysalis.jpeg b/_images/chrysalis.jpeg new file mode 100644 index 0000000..d3df35f Binary files /dev/null and b/_images/chrysalis.jpeg differ diff --git a/_images/fear.jpeg b/_images/fear.jpeg new file mode 100644 index 0000000..e879f00 Binary files /dev/null and b/_images/fear.jpeg differ diff --git a/_images/isso-nao-prova-nada.png b/_images/isso-nao-prova-nada.png new file mode 100644 index 0000000..bdb8aa1 Binary files /dev/null and b/_images/isso-nao-prova-nada.png differ diff --git a/_images/oogway.jpeg b/_images/oogway.jpeg new file mode 100644 index 0000000..7ae84cf Binary files /dev/null and b/_images/oogway.jpeg differ diff --git a/pycaxias2020.html b/pycaxias2020.html index 33d8e4a..b39de8a 100644 --- a/pycaxias2020.html +++ b/pycaxias2020.html @@ -234,6 +234,166 @@ A part of the main.

-- John Donne

+ +
+

Type Hinting: Love it

+
+ +
+

"Mas Python não tem tipos!"

+ +

+In [1]: type(object)
+Out[1]: type
+                    
+
+ +
+ +
+ +
+

+In [4]: type("a")
+Out[4]: str
+
+In [5]: type(str)
+Out[5]: type
+                    
+
+ +
+

+def to_fahrenheit(temperature: int) -> int:
+					
+
+ +
+

+@dataclass
+class Celcius:
+    temperature: int
+
+
+def to_fahrenheit(temperature: Celcius) -> int:
+                    
+
+ +
+

mypy

+
+ +
+ +
+ +
+

??

+ +

None-aware operator (PEP 505)

+ +

+a ??= 'value'
+                    
+ +

+a = a if a is not None else 'value'
+                    
+
+ +
+

@

+ +

Dedicated infix operator for matrix multiplication (PEP 465)

+
+ +
+

|

+ +

Union Operator to Dict (PEP 584)

+ +

+dict1.update(dict2)     # in-place
+                    
+ +

+dict3 = dict1 | dict2
+                    
+ +

+dict1 |= dict2          # same as .update()
+                    
+
+ +
+

:=

+ +

Assignment Operator (PEP 572)

+ +

+while chunk := file.read(8192):
+    process(chunk)
+                    
+
+ +
+

@dict[key].attr[0].decorator

+ +

Relaxing Grammar Restrictions On Decorators (PEP 614)

+
+ +
+

Steering Council 🤔

+
+ +
+

Python Positional-Only Parameters (PEP 570)

+ +

+pow(x, y, z=None, /)
+...
+
+>>> pow(x=5, y=3)
+Traceback (most recent call last):
+  File "<stdin>", line 1, in <module>
+TypeError: pow() takes no keyword arguments
+                    
+
+ +
+

"Without the ability to specify which parameters are + positional-only, library authors must be careful when + choosing appropriate parameter names."

+ +

🤦

+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+

??

+
+ +
+
+ +
+