Fix Broken Links

This commit is contained in:
A D Vishnu Prasad
2020-05-29 19:15:25 +05:30
parent fc9f806d2c
commit bd46830659
53 changed files with 294 additions and 294 deletions

View File

@@ -86,7 +86,7 @@ exercises. Feel free to look at this if you need a hint. To get the
most out of the course however, you should try to create your own
solutions first.
[Contents](Contents)
[Contents](Contents.md)

View File

@@ -5,13 +5,13 @@ the ground up. Starting with nothing, you'll learn how to edit, run,
and debug small programs. Ultimately, you'll write a short script that
reads a CSV data file and performs a simple calculation.
* [1.1 Introducing Python](01_Python)
* [1.2 A First Program](02_Hello_world)
* [1.3 Numbers](03_Numbers)
* [1.4 Strings](04_Strings)
* [1.5 Lists](05_Lists)
* [1.6 Files](06_Files)
* [1.7 Functions](07_Functions)
* [1.1 Introducing Python](01_Python.md)
* [1.2 A First Program](02_Hello_world.md)
* [1.3 Numbers](03_Numbers.md)
* [1.4 Strings](04_Strings.md)
* [1.5 Lists](05_Lists.md)
* [1.6 Files](06_Files.md)
* [1.7 Functions](07_Functions.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Next (1.2 A First Program)](02_Hello_world)
[Contents](../Contents.md) \| [Next (1.2 A First Program)](02_Hello_world.md)
# 1.1 Python
@@ -187,5 +187,5 @@ exercise work. For example:
If you can't make this work, don't worry about it. The rest of this course
has nothing to do with parsing XML.
[Contents](../Contents) \| [Next (1.2 A First Program)](02_Hello_world)
[Contents](../Contents.md) \| [Next (1.2 A First Program)](02_Hello_world.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.1 Python)](01_Python) \| [Next (1.3 Numbers)](03_Numbers)
[Contents](../Contents.md) \| [Previous (1.1 Python)](01_Python.md) \| [Next (1.3 Numbers)](03_Numbers.md)
# 1.2 A First Program
@@ -472,4 +472,4 @@ an identifying filename and line number.
* Run the program successfully
[Contents](../Contents) \| [Previous (1.1 Python)](01_Python) \| [Next (1.3 Numbers)](03_Numbers)
[Contents](../Contents.md) \| [Previous (1.1 Python)](01_Python.md) \| [Next (1.3 Numbers)](03_Numbers.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.2 A First Program)](02_Hello_world) \| [Next (1.4 Strings)](04_Strings)
[Contents](../Contents.md) \| [Previous (1.2 A First Program)](02_Hello_world.md) \| [Next (1.4 Strings)](04_Strings.md)
# 1.3 Numbers
@@ -264,4 +264,4 @@ True
>>>
```
[Contents](../Contents) \| [Previous (1.2 A First Program)](02_Hello_world) \| [Next (1.4 Strings)](04_Strings)
[Contents](../Contents.md) \| [Previous (1.2 A First Program)](02_Hello_world.md) \| [Next (1.4 Strings)](04_Strings.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.3 Numbers)](03_Numbers) \| [Next (1.5 Lists)](05_Lists)
[Contents](../Contents.md) \| [Previous (1.3 Numbers)](03_Numbers.md) \| [Next (1.5 Lists)](05_Lists.md)
# 1.4 Strings
@@ -411,7 +411,7 @@ To do that, use an f-string. For example:
>>>
```
Modify the `mortgage.py` program from [Exercise 1.10](03_Numbers) to create its output using f-strings.
Modify the `mortgage.py` program from [Exercise 1.10](03_Numbers.md) to create its output using f-strings.
Try to make it so that output is nicely aligned.
@@ -485,4 +485,4 @@ upper(...)
>>>
```
[Contents](../Contents) \| [Previous (1.3 Numbers)](03_Numbers) \| [Next (1.5 Lists)](05_Lists)
[Contents](../Contents.md) \| [Previous (1.3 Numbers)](03_Numbers.md) \| [Next (1.5 Lists)](05_Lists.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.4 Strings)](04_Strings) \| [Next (1.6 Files)](06_Files)
[Contents](../Contents.md) \| [Previous (1.4 Strings)](04_Strings.md) \| [Next (1.6 Files)](06_Files.md)
# 1.5 Lists
@@ -411,4 +411,4 @@ example, a list that consists entirely of numbers or a list of text
strings. Mixing different kinds of data together in the same list is
often a good way to make your head explode so it's best avoided.
[Contents](../Contents) \| [Previous (1.4 Strings)](04_Strings) \| [Next (1.6 Files)](06_Files)
[Contents](../Contents.md) \| [Previous (1.4 Strings)](04_Strings.md) \| [Next (1.6 Files)](06_Files.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.5 Lists)](05_Lists) \| [Next (1.7 Functions)](07_Functions)
[Contents](../Contents.md) \| [Previous (1.5 Lists)](05_Lists.md) \| [Next (1.7 Functions)](07_Functions.md)
# 1.6 File Management
@@ -242,4 +242,4 @@ So, by all means use Pandas when you go back to work. For the
rest of this course however, we're going to stick with standard
Python functionality.
[Contents](../Contents) \| [Previous (1.5 Lists)](05_Lists) \| [Next (1.7 Functions)](07_Functions)
[Contents](../Contents.md) \| [Previous (1.5 Lists)](05_Lists.md) \| [Next (1.7 Functions)](07_Functions.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.6 Files)](06_Files) \| [Next (2.0 Working with Data)](../02_Working_with_data/00_Overview)
[Contents](../Contents.md) \| [Previous (1.6 Files)](06_Files.md) \| [Next (2.0 Working with Data)](../02_Working_with_data/00_Overview.md)
# 1.7 Functions
@@ -130,7 +130,7 @@ Try typing a command such as `help(greeting)` to see it displayed.
### Exercise 1.30: Turning a script into a function
Take the code you wrote for the `pcost.py` program in [Exercise 1.27](06_Files)
Take the code you wrote for the `pcost.py` program in [Exercise 1.27](06_Files.md)
and turn it into a function `portfolio_cost(filename)`. This
function takes a filename as input, reads the portfolio data in that
file, and returns the total cost of the portfolio as a float.
@@ -278,4 +278,4 @@ Total cost: 44671.15
bash %
```
[Contents](../Contents) \| [Previous (1.6 Files)](06_Files) \| [Next (2.0 Working with Data)](../02_Working_with_data/00_Overview)
[Contents](../Contents.md) \| [Previous (1.6 Files)](06_Files.md) \| [Next (2.0 Working with Data)](../02_Working_with_data/00_Overview.md)

View File

@@ -6,12 +6,12 @@ lists, sets, and dictionaries and discusses common data handling
idioms. The last part of this section dives a little deeper
into Python's underlying object model.
* [2.1 Datatypes and Data Structures](01_Datatypes)
* [2.2 Containers](02_Containers)
* [2.3 Formatted Output](03_Formatting)
* [2.4 Sequences](04_Sequences)
* [2.5 Collections module](05_Collections)
* [2.6 List comprehensions](06_List_comprehension)
* [2.7 Object model](07_Objects)
* [2.1 Datatypes and Data Structures](01_Datatypes.md)
* [2.2 Containers](02_Containers.md)
* [2.3 Formatted Output](03_Formatting.md)
* [2.4 Sequences](04_Sequences.md)
* [2.5 Collections module](05_Collections.md)
* [2.6 List comprehensions](06_List_comprehension.md)
* [2.7 Object model](07_Objects.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (1.6 Files)](../01_Introduction/06_Files) \| [Next (2.2 Containers)](02_Containers)
[Contents](../Contents.md) \| [Previous (1.6 Files)](../01_Introduction/06_Files.md) \| [Next (2.2 Containers)](02_Containers)
# 2.1 Datatypes and Data structures
@@ -446,4 +446,4 @@ dict_items([('name', 'AA'), ('shares', 75), ('price', 32.2), ('date', (6, 11, 20
>>>
```
[Contents](../Contents) \| [Previous (1.6 Files)](../01_Introduction/06_Files) \| [Next (2.2 Containers)](02_Containers)
[Contents](../Contents.md) \| [Previous (1.6 Files)](../01_Introduction/06_Files.md) \| [Next (2.2 Containers)](02_Containers)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
[Contents](../Contents.md) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
# 2.2 Containers
@@ -205,7 +205,7 @@ for the rest of this course. Do your work in the file `Work/report.py`.
### Exercise 2.4: A list of tuples
The file `Data/portfolio.csv` contains a list of stocks in a
portfolio. In [Exercise 1.30](../01_Introduction/07_Functions), you
portfolio. In [Exercise 1.30](../01_Introduction/07_Functions.md), you
wrote a function `portfolio_cost(filename)` that read this file and
performed a simple calculation.
@@ -442,5 +442,5 @@ should take the list of stocks in Exercise 2.5 and the dictionary of
prices in Exercise 2.6 and computes the current value of the portfolio
along with the gain/loss.
[Contents](../Contents) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)
[Contents](../Contents.md) \| [Previous (2.1 Datatypes)](01_Datatypes) \| [Next (2.3 Formatting)](03_Formatting)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
[Contents](../Contents.md) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
# 2.3 Formatting
@@ -299,4 +299,4 @@ How would you modify your code so that the price includes the currency symbol ($
IBM 100 $106.28 35.84
```
[Contents](../Contents) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)
[Contents](../Contents.md) \| [Previous (2.2 Containers)](02_Containers) \| [Next (2.4 Sequences)](04_Sequences)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
[Contents](../Contents.md) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
# 2.4 Sequences
@@ -546,4 +546,4 @@ Also, be aware that `zip()` stops once the shortest input sequence is exhausted.
>>>
```
[Contents](../Contents) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)
[Contents](../Contents.md) \| [Previous (2.3 Formatting)](03_Formatting) \| [Next (2.5 Collections)](05_Collections)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
[Contents](../Contents.md) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
# 2.5 collections module
@@ -168,4 +168,4 @@ in all of Python. In fact, we could do an extended tutorial on just
that. However, doing so now would also be a distraction. For now,
put `collections` on your list of bedtime reading for later.
[Contents](../Contents) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)
[Contents](../Contents.md) \| [Previous (2.4 Sequences)](04_Sequences) \| [Next (2.6 List Comprehensions)](06_List_comprehension)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
[Contents](../Contents.md) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
# 2.6 List Comprehensions
@@ -326,4 +326,4 @@ extraction, and so forth. Becoming a guru master of list
comprehensions can substantially reduce the time spent devising a
solution. Also, don't forget about the `collections` module.
[Contents](../Contents) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)
[Contents](../Contents.md) \| [Previous (2.5 Collections)](05_Collections) \| [Next (2.7 Object Model)](07_Objects)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
[Contents](../Contents.md) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
# 2.7 Objects
@@ -451,4 +451,4 @@ Bonus: How would you modify this example to additionally parse the
Spend some time to ponder what youve done in this exercise. Well
revisit these ideas a little later.
[Contents](../Contents) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)
[Contents](../Contents.md) \| [Previous (2.6 List Comprehensions)](06_List_comprehension) \| [Next (3 Program Organization)](../03_Program_organization/00_Overview)

View File

@@ -7,11 +7,11 @@ and introduces modules. By the end you should be able to write programs
that are subdivided into functions across multiple files. We'll also give
some useful code templates for writing more useful scripts.
* [3.1 Functions and Script Writing](01_Script)
* [3.2 More Detail on Functions](02_More_functions)
* [3.3 Exception Handling](03_Error_checking)
* [3.4 Modules](04_Modules)
* [3.5 Main module](05_Main_module)
* [3.6 Design Discussion about Embracing Flexibilty](06_Design_discussion)
* [3.1 Functions and Script Writing](01_Script.md)
* [3.2 More Detail on Functions](02_More_functions.md)
* [3.3 Exception Handling](03_Error_checking.md)
* [3.4 Modules](04_Modules.md)
* [3.5 Main module](05_Main_module.md)
* [3.6 Design Discussion about Embracing Flexibilty](06_Design_discussion.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (2.7 Object Model)](../02_Working_with_data/07_Objects) \| [Next (3.2 More on Functions)](02_More_functions)
[Contents](../Contents.md) \| [Previous (2.7 Object Model)](../02_Working_with_data/07_Objects) \| [Next (3.2 More on Functions)](02_More_functions)
# 3.1 Scripting
@@ -299,4 +299,4 @@ you can. At some point, that script is going to grow and you'll wish
you had a bit more organization. Also, a little known fact is that Python
runs a bit faster if you use functions.
[Contents](../Contents) \| [Previous (2.7 Object Model)](../02_Working_with_data/07_Objects) \| [Next (3.2 More on Functions)](02_More_functions)
[Contents](../Contents.md) \| [Previous (2.7 Object Model)](../02_Working_with_data/07_Objects) \| [Next (3.2 More on Functions)](02_More_functions)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.1 Scripting)](01_Script) \| [Next (3.3 Error Checking)](03_Error_checking)
[Contents](../Contents.md) \| [Previous (3.1 Scripting)](01_Script) \| [Next (3.3 Error Checking)](03_Error_checking)
# 3.2 More on Functions
@@ -513,4 +513,4 @@ select out columns of interest, perform type conversions, without
having to worry too much about the inner workings of files or the
`csv` module.
[Contents](../Contents) \| [Previous (3.1 Scripting)](01_Script) \| [Next (3.3 Error Checking)](03_Error_checking)
[Contents](../Contents.md) \| [Previous (3.1 Scripting)](01_Script) \| [Next (3.3 Error Checking)](03_Error_checking)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.2 More on Functions)](02_More_functions) \| [Next (3.4 Modules)](04_Modules)
[Contents](../Contents.md) \| [Previous (3.2 More on Functions)](02_More_functions) \| [Next (3.4 Modules)](04_Modules)
# 3.3 Error Checking
@@ -402,4 +402,4 @@ most programs. As a general rule, you shouldnt silently ignore
errors. Instead, its better to report problems and to give the user
an option to the silence the error message if they choose to do so.
[Contents](../Contents) \| [Previous (3.2 More on Functions)](02_More_functions) \| [Next (3.4 Modules)](04_Modules)
[Contents](../Contents.md) \| [Previous (3.2 More on Functions)](02_More_functions) \| [Next (3.4 Modules)](04_Modules)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.3 Error Checking)](03_Error_checking) \| [Next (3.5 Main Module)](05_Main_module)
[Contents](../Contents.md) \| [Previous (3.3 Error Checking)](03_Error_checking) \| [Next (3.5 Main Module)](05_Main_module)
# 3.4 Modules
@@ -338,4 +338,4 @@ also contains `read_portfolio()` and `read_prices()` functions. And
finally, `pcost.py` which computes the portfolio cost, but makes use
of the `read_portfolio()` function written for the `report.py` program.
[Contents](../Contents) \| [Previous (3.3 Error Checking)](03_Error_checking) \| [Next (3.5 Main Module)](05_Main_module)
[Contents](../Contents.md) \| [Previous (3.3 Error Checking)](03_Error_checking) \| [Next (3.5 Main Module)](05_Main_module)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.4 Modules)](04_Modules) \| [Next (3.6 Design Discussion)](06_Design_discussion)
[Contents](../Contents.md) \| [Previous (3.4 Modules)](04_Modules) \| [Next (3.6 Design Discussion)](06_Design_discussion)
# 3.5 Main Module
@@ -303,4 +303,4 @@ bash $ python3 pcost.py Data/portfolio.csv
Total cost: 44671.15
```
[Contents](../Contents) \| [Previous (3.4 Modules)](04_Modules) \| [Next (3.6 Design Discussion)](06_Design_discussion)
[Contents](../Contents.md) \| [Previous (3.4 Modules)](04_Modules) \| [Next (3.6 Design Discussion)](06_Design_discussion)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.5 Main module)](05_Main_module) \| [Next (4 Classes)](../04_Classes_objects/00_Overview)
[Contents](../Contents.md) \| [Previous (3.5 Main module)](05_Main_module) \| [Next (4 Classes)](../04_Classes_objects/00_Overview)
# 3.6 Design Discussion
@@ -134,4 +134,4 @@ Fix the `read_portfolio()` and `read_prices()` functions in the
Afterwards, your `report.py` and `pcost.py` programs should work
the same way they always did.
[Contents](../Contents) \| [Previous (3.5 Main module)](05_Main_module) \| [Next (4 Classes)](../04_Classes_objects/00_Overview)
[Contents](../Contents.md) \| [Previous (3.5 Main module)](05_Main_module) \| [Next (4 Classes)](../04_Classes_objects/00_Overview)

View File

@@ -8,9 +8,9 @@ use to build extensible programs. Finally, we'll look at a few other
features of classes including special methods, dynamic attribute lookup,
and defining new exceptions.
* [4.1 Introducing Classes](01_Class)
* [4.2 Inheritance](02_Inheritance)
* [4.3 Special Methods](03_Special_methods)
* [4.4 Defining new Exception](04_Defining_exceptions)
* [4.1 Introducing Classes](01_Class.md)
* [4.2 Inheritance](02_Inheritance.md)
* [4.3 Special Methods](03_Special_methods.md)
* [4.4 Defining new Exception](04_Defining_exceptions.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (3.6 Design discussion)](../03_Program_organization/06_Design_discussion) \| [Next (4.2 Inheritance)](02_Inheritance)
[Contents](../Contents.md) \| [Previous (3.6 Design discussion)](../03_Program_organization/06_Design_discussion) \| [Next (4.2 Inheritance)](02_Inheritance)
# 4.1 Classes
@@ -295,4 +295,4 @@ You should be able to run your functions the same as before:
>>>
```
[Contents](../Contents) \| [Previous (3.6 Design discussion)](../03_Program_organization/06_Design_discussion) \| [Next (4.2 Inheritance)](02_Inheritance)
[Contents](../Contents.md) \| [Previous (3.6 Design discussion)](../03_Program_organization/06_Design_discussion) \| [Next (4.2 Inheritance)](02_Inheritance)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (4.1 Classes)](01_Class) \| [Next (4.3 Special methods)](03_Special_methods)
[Contents](../Contents.md) \| [Previous (4.1 Classes)](01_Class) \| [Next (4.3 Special methods)](03_Special_methods)
# 4.2 Inheritance
@@ -624,4 +624,4 @@ on the topic of design patterns (although understanding what happened
in this exercise will take you pretty far in terms of using objects in
a practically useful way).
[Contents](../Contents) \| [Previous (4.1 Classes)](01_Class) \| [Next (4.3 Special methods)](03_Special_methods)
[Contents](../Contents.md) \| [Previous (4.1 Classes)](01_Class) \| [Next (4.3 Special methods)](03_Special_methods)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (4.2 Inheritance)](02_Inheritance) \| [Next (4.4 Exceptions)](04_Defining_exceptions)
[Contents](../Contents.md) \| [Previous (4.2 Inheritance)](02_Inheritance) \| [Next (4.4 Exceptions)](04_Defining_exceptions)
# 4.3 Special Methods
@@ -287,5 +287,5 @@ it should work:
>>>
```
[Contents](../Contents) \| [Previous (4.2 Inheritance)](02_Inheritance) \| [Next (4.4 Exceptions)](04_Defining_exceptions)
[Contents](../Contents.md) \| [Previous (4.2 Inheritance)](02_Inheritance) \| [Next (4.4 Exceptions)](04_Defining_exceptions)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (4.3 Special methods)](03_Special_methods) \| [Next (5 Object Model)](../05_Object_model/00_Overview)
[Contents](../Contents.md) \| [Previous (4.3 Special methods)](03_Special_methods) \| [Next (5 Object Model)](../05_Object_model/00_Overview)
# 4.4 Defining Exceptions
@@ -51,4 +51,4 @@ FormatError: Unknown table format xls
>>>
```
[Contents](../Contents) \| [Previous (4.3 Special methods)](03_Special_methods) \| [Next (5 Object Model)](../05_Object_model/00_Overview)
[Contents](../Contents.md) \| [Previous (4.3 Special methods)](03_Special_methods) \| [Next (5 Object Model)](../05_Object_model/00_Overview)

View File

@@ -13,8 +13,8 @@ It's not necessary to worry about the inner details to be productive.
However, most Python coders have a basic awareness of how classes
work. So, that's why we're covering it.
* [5.1 Dictionaries Revisited (Object Implementation)](01_Dicts_revisited)
* [5.2 Encapsulation Techniques](02_Classes_encapsulation)
* [5.1 Dictionaries Revisited (Object Implementation)](01_Dicts_revisited.md)
* [5.2 Encapsulation Techniques](02_Classes_encapsulation.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (4.4 Exceptions)](../04_Classes_objects/04_Defining_exceptions) \| [Next (5.2 Encapsulation)](02_Classes_encapsulation)
[Contents](../Contents.md) \| [Previous (4.4 Exceptions)](../04_Classes_objects/04_Defining_exceptions) \| [Next (5.2 Encapsulation)](02_Classes_encapsulation)
# 5.1 Dictionaries Revisited
@@ -656,5 +656,5 @@ Here's how the `cost()` method of instance `n` above would be found:
>>>
```
[Contents](../Contents) \| [Previous (4.4 Exceptions)](../04_Classes_objects/04_Defining_exceptions) \| [Next (5.2 Encapsulation)](02_Classes_encapsulation)
[Contents](../Contents.md) \| [Previous (4.4 Exceptions)](../04_Classes_objects/04_Defining_exceptions) \| [Next (5.2 Encapsulation)](02_Classes_encapsulation)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (5.1 Dictionaries Revisited)](01_Dicts_revisited) \| [Next (6 Generators)](../06_Generators/00_Overview)
[Contents](../Contents.md) \| [Previous (5.1 Dictionaries Revisited)](01_Dicts_revisited) \| [Next (6 Generators)](../06_Generators/00_Overview)
# 5.2 Classes and Encapsulation
@@ -353,4 +353,4 @@ optimization on classes that serve as data structures. Using slots
will make such programs use far-less memory and run a bit faster.
You should probably avoid `__slots__` on most other classes however.
[Contents](../Contents) \| [Previous (5.1 Dictionaries Revisited)](01_Dicts_revisited) \| [Next (6 Generators)](../06_Generators/00_Overview)
[Contents](../Contents.md) \| [Previous (5.1 Dictionaries Revisited)](01_Dicts_revisited) \| [Next (6 Generators)](../06_Generators/00_Overview)

View File

@@ -8,9 +8,9 @@ in the form of a so-called "generator function." This section
introduces this topic. By the end, you'll write some programs that
process some real-time streaming data in an interesting way.
* [6.1 Iteration Protocol](01_Iteration_protocol)
* [6.2 Customizing Iteration with Generators](02_Customizing_iteration)
* [6.3 Producer/Consumer Problems and Workflows](03_Producers_consumers)
* [6.4 Generator Expressions](04_More_generators)
* [6.1 Iteration Protocol](01_Iteration_protocol.md)
* [6.2 Customizing Iteration with Generators](02_Customizing_iteration.md)
* [6.3 Producer/Consumer Problems and Workflows](03_Producers_consumers.md)
* [6.4 Generator Expressions](04_More_generators.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (5.2 Encapsulation)](../05_Object_model/02_Classes_encapsulation) \| [Next (6.2 Customizing Iteration)](02_Customizing_iteration)
[Contents](../Contents.md) \| [Previous (5.2 Encapsulation)](../05_Object_model/02_Classes_encapsulation) \| [Next (6.2 Customizing Iteration)](02_Customizing_iteration)
# 6.1 Iteration Protocol
@@ -314,4 +314,4 @@ Python normally work. For container objects, supporting iteration,
indexing, containment, and other kinds of operators is an important
part of this.
[Contents](../Contents) \| [Previous (5.2 Encapsulation)](../05_Object_model/02_Classes_encapsulation) \| [Next (6.2 Customizing Iteration)](02_Customizing_iteration)
[Contents](../Contents.md) \| [Previous (5.2 Encapsulation)](../05_Object_model/02_Classes_encapsulation) \| [Next (6.2 Customizing Iteration)](02_Customizing_iteration)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (6.1 Iteration Protocol)](01_Iteration_protocol) \| [Next (6.3 Producer/Consumer)](03_Producers_consumers)
[Contents](../Contents.md) \| [Previous (6.1 Iteration Protocol)](01_Iteration_protocol) \| [Next (6.3 Producer/Consumer)](03_Producers_consumers)
# 6.2 Customizing Iteration
@@ -267,4 +267,4 @@ is now this completely general purpose utility that you can use in any program.
example, you could use it to watch server logs, debugging logs, and other similar data sources.
That's kind of cool.
[Contents](../Contents) \| [Previous (6.1 Iteration Protocol)](01_Iteration_protocol) \| [Next (6.3 Producer/Consumer)](03_Producers_consumers)
[Contents](../Contents.md) \| [Previous (6.1 Iteration Protocol)](01_Iteration_protocol) \| [Next (6.3 Producer/Consumer)](03_Producers_consumers)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (6.2 Customizing Iteration)](02_Customizing_iteration) \| [Next (6.4 Generator Expressions)](04_More_generators)
[Contents](../Contents.md) \| [Previous (6.2 Customizing Iteration)](02_Customizing_iteration) \| [Next (6.4 Generator Expressions)](04_More_generators)
# 6.3 Producers, Consumers and Pipelines
@@ -299,6 +299,6 @@ pipelines. In addition, you can create functions that package a
series of pipeline stages into a single function call (for example,
the `parse_stock_data()` function).
[Contents](../Contents) \| [Previous (6.2 Customizing Iteration)](02_Customizing_iteration) \| [Next (6.4 Generator Expressions)](04_More_generators)
[Contents](../Contents.md) \| [Previous (6.2 Customizing Iteration)](02_Customizing_iteration) \| [Next (6.4 Generator Expressions)](04_More_generators)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (6.3 Producer/Consumer)](03_Producers_consumers) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview)
[Contents](../Contents.md) \| [Previous (6.3 Producer/Consumer)](03_Producers_consumers) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview)
# 6.4 More Generators
@@ -180,4 +180,4 @@ Modify the `ticker.py` program to use generator expressions
as appropriate.
[Contents](../Contents) \| [Previous (6.3 Producer/Consumer)](03_Producers_consumers) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview)
[Contents](../Contents.md) \| [Previous (6.3 Producer/Consumer)](03_Producers_consumers) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview)

View File

@@ -10,10 +10,10 @@ It should be emphasized that the topics in this section are only meant
to serve as a very basic introduction to these ideas. You will need
to seek more advanced material to fill out details.
* [7.1 Variable argument functions](01_Variable_arguments)
* [7.2 Anonymous functions and lambda](02_Anonymous_function)
* [7.3 Returning function and closures](03_Returning_functions)
* [7.4 Function decorators](04_Function_decorators)
* [7.5 Static and class methods](05_Decorated_methods)
* [7.1 Variable argument functions](01_Variable_arguments.md)
* [7.2 Anonymous functions and lambda](02_Anonymous_function.md)
* [7.3 Returning function and closures](03_Returning_functions.md)
* [7.4 Function decorators](04_Function_decorators.md)
* [7.5 Static and class methods](05_Decorated_methods.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,5 +1,5 @@
[Contents](../Contents) \| [Previous (6.4 Generator Expressions)](../06_Generators/04_More_generators) \| [Next (7.2 Anonymous Functions)](02_Anonymous_function)
[Contents](../Contents.md) \| [Previous (6.4 Generator Expressions)](../06_Generators/04_More_generators) \| [Next (7.2 Anonymous Functions)](02_Anonymous_function)
# 7.1 Variable Arguments
@@ -230,4 +230,4 @@ Now, try silencing the errors:
>>>
```
[Contents](../Contents) \| [Previous (6.4 Generator Expressions)](../06_Generators/04_More_generators) \| [Next (7.2 Anonymous Functions)](02_Anonymous_function)
[Contents](../Contents.md) \| [Previous (6.4 Generator Expressions)](../06_Generators/04_More_generators) \| [Next (7.2 Anonymous Functions)](02_Anonymous_function)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (7.1 Variable Arguments)](01_Variable_arguments) \| [Next (7.3 Returning Functions)](03_Returning_functions)
[Contents](../Contents.md) \| [Previous (7.1 Variable Arguments)](01_Variable_arguments) \| [Next (7.3 Returning Functions)](03_Returning_functions)
# 7.2 Anonymous Functions and Lambda
@@ -165,4 +165,4 @@ Note: `lambda` is a useful shortcut because it allows you to
define a special processing function directly in the call to `sort()` as
opposed to having to define a separate function first.
[Contents](../Contents) \| [Previous (7.1 Variable Arguments)](01_Variable_arguments) \| [Next (7.3 Returning Functions)](03_Returning_functions)
[Contents](../Contents.md) \| [Previous (7.1 Variable Arguments)](01_Variable_arguments) \| [Next (7.3 Returning Functions)](03_Returning_functions)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (7.2 Anonymous Functions)](02_Anonymous_function) \| [Next (7.4 Decorators)](04_Function_decorators)
[Contents](../Contents.md) \| [Previous (7.2 Anonymous Functions)](02_Anonymous_function) \| [Next (7.4 Decorators)](04_Function_decorators)
# 7.3 Returning Functions
@@ -237,4 +237,4 @@ is often good.
Rewrite the `Stock` class in the file `stock.py` so that it uses typed properties
as shown.
[Contents](../Contents) \| [Previous (7.2 Anonymous Functions)](02_Anonymous_function) \| [Next (7.4 Decorators)](04_Function_decorators)
[Contents](../Contents.md) \| [Previous (7.2 Anonymous Functions)](02_Anonymous_function) \| [Next (7.4 Decorators)](04_Function_decorators)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (7.3 Returning Functions)](03_Returning_functions) \| [Next (7.5 Decorated Methods)](05_Decorated_methods)
[Contents](../Contents.md) \| [Previous (7.3 Returning Functions)](03_Returning_functions) \| [Next (7.5 Decorated Methods)](05_Decorated_methods)
# 7.4 Function Decorators
@@ -157,4 +157,4 @@ Discussion: This `@timethis` decorator can be placed in front of any
function definition. Thus, you might use it as a diagnostic tool for
performance tuning.
[Contents](../Contents) \| [Previous (7.3 Returning Functions)](03_Returning_functions) \| [Next (7.5 Decorated Methods)](05_Decorated_methods)
[Contents](../Contents.md) \| [Previous (7.3 Returning Functions)](03_Returning_functions) \| [Next (7.5 Decorated Methods)](05_Decorated_methods)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (7.4 Decorators)](04_Function_decorators) \| [Next (8 Testing and Debugging)](../08_Testing_debugging/00_Overview)
[Contents](../Contents.md) \| [Previous (7.4 Decorators)](04_Function_decorators) \| [Next (8 Testing and Debugging)](../08_Testing_debugging/00_Overview)
# 7.5 Decorated Methods
@@ -208,4 +208,4 @@ To use this new Portfolio class, you can now write code like this:
Make these changes to the `Portfolio` class and modify the `report.py`
code to use the class method.
[Contents](../Contents) \| [Previous (7.4 Decorators)](04_Function_decorators) \| [Next (8 Testing and Debugging)](../08_Testing_debugging/00_Overview)
[Contents](../Contents.md) \| [Previous (7.4 Decorators)](04_Function_decorators) \| [Next (8 Testing and Debugging)](../08_Testing_debugging/00_Overview)

View File

@@ -3,9 +3,9 @@
This section introduces a few basic topics related to testing,
logging, and debugging.
* [8.1 Testing](01_Testing)
* [8.2 Logging, error handling and diagnostics](02_Logging)
* [8.3 Debugging](03_Debugging)
* [8.1 Testing](01_Testing.md)
* [8.2 Logging, error handling and diagnostics](02_Logging.md)
* [8.3 Debugging](03_Debugging.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (7.5 Decorated Methods)](../07_Advanced_Topics/05_Decorated_methods) \| [Next (8.2 Logging)](02_Logging)
[Contents](../Contents.md) \| [Previous (7.5 Decorated Methods)](../07_Advanced_Topics/05_Decorated_methods) \| [Next (8.2 Logging)](02_Logging)
# 8.1 Testing
@@ -290,4 +290,4 @@ class TestStock(unittest.TestCase):
s.shares = '100'
```
[Contents](../Contents) \| [Previous (7.5 Decorated Methods)](../07_Advanced_Topics/05_Decorated_methods) \| [Next (8.2 Logging)](02_Logging)
[Contents](../Contents.md) \| [Previous (7.5 Decorated Methods)](../07_Advanced_Topics/05_Decorated_methods) \| [Next (8.2 Logging)](02_Logging)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (8.1 Testing)](01_Testing) \| [Next (8.3 Debugging)](03_Debugging)
[Contents](../Contents.md) \| [Previous (8.1 Testing)](01_Testing) \| [Next (8.3 Debugging)](03_Debugging)
# 8.2 Logging
@@ -306,4 +306,4 @@ logging.basicConfig(
Again, you'd need to put this someplace in the startup steps of your
program. For example, where would you put this in your `report.py` program?
[Contents](../Contents) \| [Previous (8.1 Testing)](01_Testing) \| [Next (8.3 Debugging)](03_Debugging)
[Contents](../Contents.md) \| [Previous (8.1 Testing)](01_Testing) \| [Next (8.3 Debugging)](03_Debugging)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (8.2 Logging)](02_Logging) \| [Next (9 Packages)](../09_Packages/00_Overview)
[Contents](../Contents.md) \| [Previous (8.2 Logging)](02_Logging) \| [Next (9 Packages)](../09_Packages/00_Overview)
# 8.3 Debugging
@@ -158,4 +158,4 @@ For breakpoints location is one of the following.
It runs. Ship it!
[Contents](../Contents) \| [Previous (8.2 Logging)](02_Logging) \| [Next (9 Packages)](../09_Packages/00_Overview)
[Contents](../Contents.md) \| [Previous (8.2 Logging)](02_Logging) \| [Next (9 Packages)](../09_Packages/00_Overview)

View File

@@ -10,8 +10,8 @@ focus of this section is on some general code organization principles
that will prove useful no matter what tools you later use to give code
away or manage dependencies.
* [9.1 Packages](01_Packages)
* [9.2 Third Party Modules](02_Third_party)
* [9.3 Giving your code to others](03_Distribution)
* [9.1 Packages](01_Packages.md)
* [9.2 Third Party Modules](02_Third_party.md)
* [9.3 Giving your code to others](03_Distribution.md)
[Contents](../Contents)
[Contents](../Contents.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (8.3 Debugging)](../08_Testing_debugging/03_Debugging) \| [Next (9.2 Third Party Packages)](02_Third_party)
[Contents](../Contents.md) \| [Previous (8.3 Debugging)](../08_Testing_debugging/03_Debugging) \| [Next (9.2 Third Party Packages)](02_Third_party.md)
# 9.1 Packages
@@ -441,4 +441,4 @@ porty-app/
typedproperty.py
```
[Contents](../Contents) \| [Previous (8.3 Debugging)](../08_Testing_debugging/03_Debugging) \| [Next (9.2 Third Party Packages)](02_Third_party)
[Contents](../Contents.md) \| [Previous (8.3 Debugging)](../08_Testing_debugging/03_Debugging) \| [Next (9.2 Third Party Packages)](02_Third_party.md)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (9.1 Packages)](01_Packages) \| [Next (9.3 Distribution)](03_Distribution)
[Contents](../Contents.md) \| [Previous (9.1 Packages)](01_Packages) \| [Next (9.3 Distribution)](03_Distribution)
# 9.2 Third Party Modules
@@ -135,7 +135,7 @@ I refer you to the [Python Packaging User Guide](https://packaging.python.org).
See if you can recreate the steps of making a virtual environment and installing
pandas into it as shown above.
[Contents](../Contents) \| [Previous (9.1 Packages)](01_Packages) \| [Next (9.3 Distribution)](03_Distribution)
[Contents](../Contents.md) \| [Previous (9.1 Packages)](01_Packages) \| [Next (9.3 Distribution)](03_Distribution)

View File

@@ -1,4 +1,4 @@
[Contents](../Contents) \| [Previous (9.2 Third Party Packages)](02_Third_party) \| [Next (The End)](TheEnd)
[Contents](../Contents.md) \| [Previous (9.2 Third Party Packages)](02_Third_party.md) \| [Next (The End)](TheEnd.md)
# 9.3 Distribution
@@ -78,7 +78,7 @@ Create a source distribution file by running `python setup.py sdist`.
As a final step, see if you can install your package into a Python
virtual environment.
[Contents](../Contents) \| [Previous (9.2 Third Party Packages)](02_Third_party) \| [Next (The End)](TheEnd)
[Contents](../Contents.md) \| [Previous (9.2 Third Party Packages)](02_Third_party.md) \| [Next (The End)](TheEnd.md)

View File

@@ -6,5 +6,5 @@ May your future Python hacking be fun and productive!
I'm always happy to get feedback. You can find me at [https://dabeaz.com](https://dabeaz.com)
or on Twitter at [@dabeaz](https://twitter.com/dabeaz). - David Beazley.
[Contents](../Contents) \| [Home](../..)
[Contents](../Contents.md) \| [Home](../..)

View File

@@ -2,16 +2,16 @@
## Table of Contents
* [0. Course Setup (READ FIRST!)](00_Setup)
* [1. Introduction to Python](01_Introduction/00_Overview)
* [2. Working with Data](02_Working_with_data/00_Overview)
* [3. Program Organization](03_Program_organization/00_Overview)
* [4. Classes and Objects](04_Classes_objects/00_Overview)
* [5. The Inner Workings of Python Objects](05_Object_model/00_Overview)
* [6. Generators](06_Generators/00_Overview)
* [7. A Few Advanced Topics](07_Advanced_Topics/00_Overview)
* [8. Testing, Logging, and Debugging](08_Testing_debugging/00_Overview)
* [9. Packages](09_Packages/00_Overview)
* [0. Course Setup (READ FIRST!)](00_Setup.md)
* [1. Introduction to Python](01_Introduction/00_Overview.md)
* [2. Working with Data](02_Working_with_data/00_Overview.md)
* [3. Program Organization](03_Program_organization/00_Overview.md)
* [4. Classes and Objects](04_Classes_objects/00_Overview.md)
* [5. The Inner Workings of Python Objects](05_Object_model/00_Overview.md)
* [6. Generators](06_Generators/00_Overview.md)
* [7. A Few Advanced Topics](07_Advanced_Topics/00_Overview.md)
* [8. Testing, Logging, and Debugging](08_Testing_debugging/00_Overview.md)
* [9. Packages](09_Packages/00_Overview.md)
[Home](..)