Skip to content

Commit 97d64e4

Browse files
committed
docs
1 parent 42799b2 commit 97d64e4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ test_fail(divide_zero)
9999
test_stdout(lambda: print('hi'), 'hi')
100100
```
101101

102-
## Foundations
102+
### Foundations
103103

104104
fast.ai is unusual in that we often use [mixins](https://en.wikipedia.org/wiki/Mixin) in our code. Mixins are widely used in many programming languages, such as Ruby, but not so much in Python. We use mixins to attach new behavior to existing libraries, or to allow modules to add new behavior to our own classes, such as in extension modules. One useful example of a mixin we define is `Path.ls`, which lists a directory and returns an `L` (an extended list class which we'll discuss shortly):
105105

@@ -191,7 +191,7 @@ The `assert not kwargs` above is used to ensure that the user doesn't pass an un
191191

192192
`fastcore` also provides many utility functions that make a Python programmer's life easier, in `fastcore.utils`. We won't look at many here, since you can easily look at the docs yourself. To get you started, have a look at the docs for `chunked` (remember, if you're in a notebook, type `doc(chunked)`), which is a handy function for creating lazily generated batches from a collection.
193193

194-
## L
194+
### L
195195

196196
List most languages, Python allows for very concise syntax for some very common types, such as `list`, which can be constructed with `[1,2,3]`. Perl's designer Larry Wall explained the reasoning for this kind of syntax:
197197
> In metaphorical honor of Huffman’s compression code that assigns smaller numbers of bits to more common bytes. In terms of syntax, it simply means that commonly used things should be shorter, but you shouldn’t waste short sequences on less common constructs.
@@ -264,7 +264,7 @@ There's too much functionality to show it all here, so be sure to check the docs
264264

265265

266266

267-
## Function dispatch and Transforms
267+
### Function dispatch and Transforms
268268

269269
Most Python programmers use object oriented methods and inheritance to allow different objects to behave in different ways even when called with the same method name. Some languages use a very different approach, such as Julia, which uses [multiple dispatch generic functions](https://docs.julialang.org/en/v1/manual/methods/). Python provides [single dispatch generic functions](https://www.python.org/dev/peps/pep-0443/) as part of the standard library. `fastcore` provides multiple dispatch, with the `typedispatch` decorator (which is actually an instance of `DispatchReg`):
270270

docs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ <h3 id="Testing">Testing<a class="anchor-link" href="#Testing"> </a></h3>
330330

331331
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
332332
<div class="text_cell_render border-box-sizing rendered_html">
333-
<h2 id="Foundations">Foundations<a class="anchor-link" href="#Foundations"> </a></h2>
333+
<h3 id="Foundations">Foundations<a class="anchor-link" href="#Foundations"> </a></h3>
334334
</div>
335335
</div>
336336
</div>
@@ -566,7 +566,7 @@ <h2 id="Foundations">Foundations<a class="anchor-link" href="#Foundations"> </a>
566566
</div>
567567
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
568568
<div class="text_cell_render border-box-sizing rendered_html">
569-
<h2 id="L">L<a class="anchor-link" href="#L"> </a></h2>
569+
<h3 id="L">L<a class="anchor-link" href="#L"> </a></h3>
570570
</div>
571571
</div>
572572
</div>
@@ -777,7 +777,7 @@ <h2 id="L">L<a class="anchor-link" href="#L"> </a></h2>
777777

778778
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
779779
<div class="text_cell_render border-box-sizing rendered_html">
780-
<h2 id="Function-dispatch-and-Transforms">Function dispatch and Transforms<a class="anchor-link" href="#Function-dispatch-and-Transforms"> </a></h2>
780+
<h3 id="Function-dispatch-and-Transforms">Function dispatch and Transforms<a class="anchor-link" href="#Function-dispatch-and-Transforms"> </a></h3>
781781
</div>
782782
</div>
783783
</div>

nbs/index.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
"cell_type": "markdown",
259259
"metadata": {},
260260
"source": [
261-
"## Foundations"
261+
"### Foundations"
262262
]
263263
},
264264
{
@@ -431,7 +431,7 @@
431431
"cell_type": "markdown",
432432
"metadata": {},
433433
"source": [
434-
"## L"
434+
"### L"
435435
]
436436
},
437437
{
@@ -580,7 +580,7 @@
580580
"cell_type": "markdown",
581581
"metadata": {},
582582
"source": [
583-
"## Function dispatch and Transforms"
583+
"### Function dispatch and Transforms"
584584
]
585585
},
586586
{

0 commit comments

Comments
 (0)