diff --git a/_images/london-ripper.jpg b/_images/london-ripper.jpg
new file mode 100644
index 0000000..59a5bc2
Binary files /dev/null and b/_images/london-ripper.jpg differ
diff --git a/_images/my_opinion.jpg b/_images/my_opinion.jpg
new file mode 100644
index 0000000..dc78782
Binary files /dev/null and b/_images/my_opinion.jpg differ
diff --git a/_images/python.jpg b/_images/python.jpg
new file mode 100644
index 0000000..b252228
Binary files /dev/null and b/_images/python.jpg differ
diff --git a/_images/python36-new.png b/_images/python36-new.png
new file mode 100644
index 0000000..62bbaf1
Binary files /dev/null and b/_images/python36-new.png differ
diff --git a/python36.html b/python36.html
index acd6dd0..866dbbc 100644
--- a/python36.html
+++ b/python36.html
@@ -44,6 +44,10 @@
.reveal section img {
border: none;
}
+
+ ul.empty {
+ list-style: none;
+ }
@@ -51,7 +55,7 @@
-
+
Python 3.6
Novidades da versão
@@ -61,10 +65,10 @@
-
+
-
+
- Júlio Biason
-
- @juliobiason
@@ -75,6 +79,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Underscores em números
@@ -132,7 +154,7 @@ or ""
- >>> captain: str # None
+ >>> captain: str # mas continua como undefined
>>> values: List[int] = [1, 2, 4]
Essas informações podem ser extraídas de __annotations__
@@ -152,16 +174,44 @@ or ""
+
+
+ enum
+
+ Novo tipo auto
para gerar número automaticamente.
+
+
+ >>> from enum import Enum, auto
+>>> class Color(Enum):
+... red = auto()
+... blue = auto()
+... green = auto()
+...
+>>> list(Color)
+[<<Color.red: 1>, <Color.blue: 2>, <Color.green: 3>]
+
+
+
+
+
+ importlib
+
+ Ao tentar importar um módulo que não existe, será gerado
+ ModuleNotFoundError
ao invés de
+ ImportError
.
+
+
+
Pathlib
Representação de um caminho qualquer no sistema de arquivos.
- import pathlib
+ >>> import pathlib
>>> with open(pathlib.Path("README")) as f:
... contents = f.read()
-...
+...
>>> import os.path
>>> os.path.splitext(pat)
('some_file', '.txt')
@@ -192,8 +242,55 @@ or ""
Async the world!
+
+ asyncio
agora é oficial.
+
+
+
+ Async generators
+
+ async def ticker(delay, to):
+ """Yield numbers from 0 to *to* every *delay* seconds."""
+ for i in range(to):
+ yield i
+ await asyncio.sleep(delay)
+
+
+
+ Async comprehensions
+
+ result = [i async for i in aiter() if i % 2]
+
+ result = [await fun() for fun in funcs if await condition()]
+
+
+
+ Last but not least
+
+
+ - Customização de classes com
__init_subclass__()
;
+ - Suporte a DTrace e SystemTrap;
+ - Variável de ambiente para mudar a forma de alocação de memória e mudanças
+ no módulo
tracemalloc
;
+ - Desambiguação de datas com entrada do horário de verão;
+ typing
com novidades;
+
+
+
+
+
+ os.urandom()
vai bloquear até que haja entropia suficiente
+ para gerar um número;
+ - Suporte a OpenSSL 1.1.0;
+ - Novos métodos criptográficos em
hashlib
;
+ - Sistema de arquivos do Windows agora é considerado UTF-8;
+ - Facilidades para definir o PATH das bibliotecas com arquivos
+ ._pth.
+
+
+