Skip to content

Commit 3b09073

Browse files
committed
cap01: PDF gerado
1 parent 6d36de7 commit 3b09073

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

capitulos/cap01.adoc

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ Faremos isso em <<ch_generators>>.
380380

381381
[[vectors_fig]]
382382
.Soma de vetores bi-dimensionais; `Vector(2, 4) + Vector(2, 1)` devolve `Vector(4, 5)`.
383-
image::images/flpy_0101.png[vetores 2D]
383+
image::../images/flpy_0101.png[vetores 2D]
384384

385385
Vamos começar a projetar a API para essa classe escrevendo em uma sessão de console simulada,
386386
que depois podemos usar como um doctest.
@@ -571,7 +571,7 @@ mostrando como elas são criadas a partir de métodos especiais.
571571
[role="width-70"]
572572
[[collection_uml]]
573573
.Diagrama de classes UML com os tipos fundamentais de coleções. Métodos como nome em _itálico_ são abstratos, então precisam ser implementados pelas subclasses concretas, tais como `list` e `dict`. O restante dos métodos tem implementações concretas, então as subclasses podem herdá-los.
574-
image::images/flpy_0102.png[Diagram de classes UML com todas as superclasses e algumas subclasses de `abc.Collection`]
574+
image::../images/flpy_0102.png[Diagram de classes UML com todas as superclasses e algumas subclasses de `abc.Collection`]
575575

576576
Cada uma das ABCs no topo da hierarquia tem um único método especial.
577577
A ABC `Collection` (introduzida n Python 3.6) unifica as três interfaces essenciais,
@@ -627,10 +627,13 @@ A maioria desses métodos será tratado ao longo do livro, incluindo as adiçõe
627627
métodos especiais assíncronos como `+__anext__+` (acrescentado n Python 3.5), e o método de personalização de classes, `+__init_subclass__+` (d Python 3.6).
628628

629629
////
630-
PROD: Please make sure funcion names such as divmod() and __truediv__ are not broken at line breaks in the table cells. Thanks!
631-
I put all the method names in each table cell inside a single code markup `x` because if each name is in a separate ``, then the space between the names looks too small.
632-
If it's too hard to increase the space between the words, then we could put a semicolon between them. In the first edition we used colons but it looked like a tiny defect.
633-
I tried to use keep-together in <<special_operators_tbl>> but it was rendering a 0 (zero) instead of the content within the <code> element.
630+
PROD: Please make sure funcion names such as divmod() and __truediv__ are not
631+
broken at line breaks in the table cells. Thanks!
632+
I put all the method names in each table cell inside a single code markup `x`
633+
because if each name is in a separate ``, then the space between the names looks too small.
634+
If it's too hard to increase the space between the words, then we could put a semicolon between them.
635+
In the first edition we used colons but it looked like a tiny defect.
636+
I tried to use keep-together in <special_operators_tbl> but it was rendering a 0 (zero) instead of the content within the <code> element.
634637
////
635638

636639
[[special_names_tbl]]
@@ -640,7 +643,7 @@ I tried to use keep-together in <<special_operators_tbl>> but it was rendering a
640643
|Categoria|Nomes dos métodos
641644
|Representação de string/bytes|`+__repr__ __str__ __format__ __bytes__ __fspath__+`
642645
|Conversão para número|`+__bool__ __complex__ __int__ __float__ __hash__ __index__+`
643-
|Emulação de coleções|pass:[<code>__len__ __getitem__ __setitem__ __delitem__ </code><span class="keep-together"><code>__contains__</code></span>]
646+
|Emulação de coleções|`+__len__ __getitem__ __setitem__ __delitem__ __contains__+`
644647
|Iteração|`+__iter__ __aiter__ __next__ __anext__ __reversed__+`
645648
|Execução de chamável ou corrotina|`+__call__ __await__+`
646649
|Gerenciamento de contexto|`+__enter__ __exit__ __aexit__ __aenter__+`
@@ -653,8 +656,9 @@ I tried to use keep-together in <<special_operators_tbl>> but it was rendering a
653656

654657
Operadores infixos e numéricos são suportados pelos métodos especiais listados na
655658
<<special_operators_tbl>>.
656-
// pass:[<a data-type="xref" href="#special_operators_tbl" data-xrefstyle="select: labelnumber">#special_operators_tbl</a>].
657-
Aqui os nomes mais recentes são `+__matmul__+`, `+__rmatmul__+`, e `+__imatmul__+`, adicionados n Python 3.5 para suportar o uso de `@` como um operador infixo de multiplicação de matrizes, como veremos no <<ch_op_overload>>.((("special methods", "special method names and symbols for operators")))
659+
Aqui os nomes mais recentes são `+__matmul__+`, `+__rmatmul__+`, e `+__imatmul__+`,
660+
adicionados n Python 3.5 para suportar o uso de `@` como operador de multiplicação de matrizes,
661+
como veremos no <<ch_op_overload>>.((("special methods", "special method names and symbols for operators")))
658662

659663
[[special_operators_tbl]]
660664
.Nomes e símbolos de métodos especiais para operadores
@@ -664,7 +668,7 @@ Aqui os nomes mais recentes são `+__matmul__+`, `+__rmatmul__+`, e `+__imatmul_
664668
|Unário numérico| `- + abs()` | `+__neg__ __pos__ __abs__+`
665669
|Comparação rica| `< \<= == != > >=` | `+__lt__ __le__ __eq__ __ne__ __gt__ __ge__+`
666670
|Aritmético| `+ - * / // % @ divmod() round() ** pow()` | `+__add__ __sub__ __mul__+` pass:[<span class="keep-together"><code> __truediv__ </code></span>] `+__floordiv__ __mod__+` pass:[<span class="keep-together"><code> __matmul__ </code></span>] `+__divmod__ __round__ __pow__+`
667-
|Aritmética reversa| operadores aritméticos com operandos invertidos) |`+__radd__ __rsub__ __rmul__ __rtruediv__ __rfloordiv__ __rmod__ __rmatmul__ __rdivmod__ __rpow__+`
671+
|Aritmética reversa| (operadores aritméticos com operandos invertidos) |`+__radd__ __rsub__ __rmul__ __rtruediv__ __rfloordiv__ __rmod__ __rmatmul__ __rdivmod__ __rpow__+`
668672
|Atribuição aritmética aumentada| `+= -= \*= /= //= %= @= **=` | `+__iadd__ __isub__ __imul__ __itruediv__ __ifloordiv__ __imod__ __imatmul__ __ipow__+`
669673
|Bit a bit | `& \| ^ << >> ~` | `+__and__ __or__ __xor__ __lshift__ __rshift__ __invert__+`
670674
|Bit a bit reversa| (operadores bit a bit com os operandos invertidos) | `+__rand__ __ror__ __rxor__ __rlshift__ __rrshift__+`

volumes/make_pdf.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
asciidoctor-pdf -a media=preprint --theme default-for-print $1

0 commit comments

Comments
 (0)