GitHub

Original file line numberDiff line numberDiff line change

@@ -74,7 +74,7 @@ str(22)

7474

type(22)

7575

```

7676
77-

The full list of Python built-ins is [here](https://docs.python.org/library/functions.html).

77+

The full list of Python built-ins is [here](https://docs.python.org/3/library/functions.html).

7878
7979
8080

### Third Party Functions

Original file line numberDiff line numberDiff line change

@@ -1480,9 +1480,9 @@ But this is inefficient relative to computing `Q` once-off.

14801480

A better option is to use descriptors.

14811481
14821482

A solution from the [quantecon

1483-

library](https://github.com/QuantEcon/QuantEcon.py/tree/master/quantecon)

1483+

library](https://github.com/QuantEcon/QuantEcon.py/tree/main/quantecon)

14841484

using descriptors that behaves as we desire can be found

1485-

[here](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/discrete_rv.py).

1485+

[here](https://github.com/QuantEcon/QuantEcon.py/blob/main/quantecon/discrete_rv.py).

14861486
14871487

```{solution-end}

14881488

```

@@ -1505,7 +1505,7 @@ Your task is to

15051505
15061506

An example solution is given below.

15071507
1508-

In essence, we've just taken [this code](https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/ecdf.py)

1508+

In essence, we've just taken [this code](https://github.com/QuantEcon/QuantEcon.py/blob/main/quantecon/ecdf.py)

15091509

from QuantEcon and added in a plot method

15101510
15111511

```{code-cell} python3

Original file line numberDiff line numberDiff line change

@@ -606,7 +606,7 @@ time from the World Bank.

606606
607607

The World Bank [collects and organizes data](https://data.worldbank.org/indicator) on a huge range of indicators.

608608
609-

For example, [here's](https://data.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS/countries) some data on government debt as a ratio to GDP.

609+

For example, [here's](https://data.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS) some data on government debt as a ratio to GDP.

610610
611611

The next code example fetches the data for you and plots time series for the US and Australia

612612
Original file line numberDiff line numberDiff line change

@@ -701,7 +701,7 @@ In programming, as in mathematics, the opposite is true

701701

reversed would be very hard to read, even if the author told you so on the

702702

first page.

703703
704-

In Python, the standard style is set out in [PEP8](https://www.python.org/dev/peps/pep-0008/).

704+

In Python, the standard style is set out in [PEP8](https://peps.python.org/pep-0008/).

705705
706706

(Occasionally we'll deviate from PEP8 in these lectures to better match mathematical notation)

707707
Original file line numberDiff line numberDiff line change

@@ -133,7 +133,7 @@ axes[2].legend(loc='upper left', frameon=True)

133133

plt.show()

134134

```

135135
136-

True, the code more or less follows [PEP8](https://www.python.org/dev/peps/pep-0008/).

136+

True, the code more or less follows [PEP8](https://peps.python.org/pep-0008/).

137137
138138

At the same time, it's very poorly structured.

139139

Read the original on github.com ↗