Skip to content

Commit 7514d85

Browse files
committed
Code review changes and additional edits to links.
1 parent caa95fe commit 7514d85

File tree

5 files changed

+37
-63
lines changed

5 files changed

+37
-63
lines changed

concepts/basics/.meta/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"blurb": "Python is a dynamic and strongly typed object-oriented programming language in which variables can be bound and re-bound to any data type. It employs both duck typing and gradual typing (via type hints). Python uses significant indentation to denote code blocks and puts strong emphasis on code readability.",
2+
"blurb": "Python is a dynamic and strongly typed programming language in which variables can be bound and re-bound to any data type. It employs both duck typing and gradual typing (via type hints). Python uses significant indentation to denote code blocks and puts strong emphasis on code readability.",
33
"authors": ["BethanyG"],
44
"contributors": ["cmccandless", "PaulT89"]
55
}

concepts/basics/about.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# basics
22

3-
Python is a [dynamic and strongly][dynamic typing in python] typed [object-oriented][object oriented programming] programming language.
3+
Python is a [dynamic and strongly typed][dynamic typing in python] programming language.
44
It employs both [duck typing][duck typing] and [gradual typing][gradual typing], via [type hints][type hints].
55
Imperative, declarative (e.g., functional), and object-oriented programming _styles_ are all supported, but internally **[everything in Python is an object][everythings an object]**.
66

@@ -41,15 +41,15 @@ On the Python track, [variables][variables] are always written in [`snake_case`]
4141
## Name Assignment (Variables & Constants)
4242

4343
In Python, there are no keywords used in creating variables or constants.
44-
Instead, programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
44+
Instead, programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
4545
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
4646

4747
For example, `my_first_variable` can be re-assigned many times using `=`, and can refer to different object types with each re-assignment:
4848

4949

5050
```python
51-
>>> my_first_variable = 1 # Name bound to an integer object of value one.
52-
>>> my_first_variable = 2 # Name re-assigned to integer value 2.
51+
>>> my_first_variable = 1 # my_first_variable bound to an integer object of value one.
52+
>>> my_first_variable = 2 # my_first_variable re-assigned to integer value 2.
5353

5454
>>> print(type(my_first_variable))
5555
<class 'int'>
@@ -65,7 +65,7 @@ For example, `my_first_variable` can be re-assigned many times using `=`, and ca
6565
"Now, I'm a string." # Strings can be declared using single or double quote marks.
6666

6767
import collections
68-
>>> my_first_variable = collections.Counter([1,1,2,3,3,3,4,5,6,7]) # Now the name has been re-bound to a Counter object.
68+
>>> my_first_variable = collections.Counter([1,1,2,3,3,3,4,5,6,7]) # Now my_first_variable has been re-bound to a Counter object.
6969
>>> print(type(my_first_variable))
7070
<class 'collections.Counter'>
7171

@@ -106,7 +106,7 @@ Statements for the _body_ of the function begin on the line following `def` and
106106

107107

108108
```python
109-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
109+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
110110
def add_two_numbers(number_one, number_two):
111111
total = number_one + number_two
112112
print(total)
@@ -290,7 +290,6 @@ errors defaults to 'strict'.
290290
[method objects]: https://docs.python.org/3/c-api/method.html#method-objects
291291
[module]: https://docs.python.org/3/tutorial/modules.html
292292
[none]: https://docs.python.org/3/library/constants.html
293-
[object oriented programming]: https://en.wikipedia.org/wiki/Object-oriented_programming
294293
[objects]: https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy
295294
[parameters]: https://docs.python.org/3/glossary.html#term-parameter
296295
[peps]: https://www.python.org/dev/peps/

concepts/basics/introduction.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# Introduction
22

3-
Python is a [dynamic and strongly][dynamic typing in python] typed programming language.
4-
It employs both [duck typing][duck typing] and [gradual typing][gradual typing] via [type hints][type hints].
3+
Python is a [dynamic and strongly typed][dynamic typing in python] programming language.
4+
It employs both [duck typing][duck typing] and [gradual typing][gradual typing], via [type hints][type hints].
55

6-
While Python supports many different programming _styles_, internally **everything in Python is an [object][everythings an object]**.
7-
This includes numbers, strings, lists, and even functions.
6+
Imperative, declarative (e.g., functional), and object-oriented programming _styles_ are all supported, but internally **[everything in Python is an object][everythings an object]**.
7+
8+
Python puts a strong emphasis on code readability and (_similar to Haskell_) uses [significant indentation][significant indentation] to denote function, method, and class definitions.
9+
10+
Python was created by Guido van Rossum and first released in 1991.
811

912

1013
## Name Assignment (Variables & Constants)
1114

12-
Programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
15+
Programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
1316
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
1417

1518

1619
```python
17-
>>> my_first_variable = 1 # Name bound to an integer object of value one.
18-
>>> my_first_variable = 2 # Name re-assigned to integer value 2.
20+
>>> my_first_variable = 1 # my_first_variable bound to an integer object of value one.
21+
>>> my_first_variable = 2 # my_first_variable re-assigned to integer value 2.
1922

2023
>>> print(type(my_first_variable))
2124
<class 'int'>
@@ -47,7 +50,7 @@ Statements for the _body_ of the function begin on the line following `def` and
4750

4851

4952
```python
50-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
53+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
5154
def add_two_numbers(number_one, number_two):
5255
total = number_one + number_two
5356
print(total)
@@ -133,3 +136,4 @@ def complex(real=0.0, imag=0.0):
133136
[parameters]: https://docs.python.org/3/glossary.html#term-parameter
134137
[return]: https://docs.python.org/3/reference/simple_stmts.html#return
135138
[type hints]: https://docs.python.org/3/library/typing.html
139+
[significant indentation]: https://docs.python.org/3/reference/lexical_analysis.html#indentation

concepts/basics/links.json

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,18 @@
11
[
2-
{
3-
"url": "https://docs.python.org/3/",
4-
"description": "Python documentation"
5-
},
6-
{
7-
"url": "https://www.python.org/dev/peps/pep-0008/",
8-
"description": "PEP 8"
9-
},
10-
{
11-
"url": "https://www.python.org/dev/peps/pep-0020/",
12-
"description": "The Zen of Python (PEP 20)"
2+
{"url": "https://lerner.co.il/2019/06/18/understanding-python-assignment/",
3+
"description": "Reuven Lerner: Understanding Python Assignment"
134
},
145
{
15-
"url": "https://nedbatchelder.com/text/names.html",
16-
"description": "Ned Batchelder: Facts and Myths about Python Names."
6+
"url": "https://www.youtube.com/watch?v=owglNL1KQf0",
7+
"description": "Sentdex (YouTube): Python 3 Programming Tutorial - Functions"
178
},
189
{
19-
"url": "https://realpython.com/python-variables/",
20-
"description": "variables in Python"
10+
"url": "https://realpython.com/documenting-python-code/#commenting-vs-documenting-code",
11+
"description": "Real Python: Commenting vs Documenting Code."
2112
},
2213
{
23-
"url": "https://docs.python.org/3/tutorial/controlflow.html#defining-functions",
24-
"description": "function definition"
25-
},
26-
{
27-
"url": "https://docs.python.org/3/tutorial/controlflow.html#default-argument-values",
28-
"description": "default arguments"
29-
},
30-
{
31-
"url": "https://realpython.com/python-comments-guide/#python-commenting-basics",
32-
"description": "Comments"
33-
},
34-
{
35-
"url": "https://docs.python.org/3/tutorial/controlflow.html#tut-docstrings",
36-
"description": "docstring"
37-
},
38-
{
39-
"url": "https://www.python.org/psf-landing/",
40-
"description": "Python Software Foundation"
41-
},
42-
{
43-
"url": "https://www.python.org/dev/peps/",
44-
"description": "Python Enhancement Proposals or PEPs"
45-
},
46-
{
47-
"url": "https://docs.python.org/3/reference/datamodel.html",
48-
"description": "everything in Python is an object"
14+
"url": "https://www.pythonmorsels.com/everything-is-an-object/",
15+
"description": "Python Morsels: Everything is an Object"
4916
},
5017
{
5118
"url": "https://stackoverflow.com/questions/11328920/is-python-strongly-typed",
@@ -60,7 +27,11 @@
6027
"description": "significant indentation"
6128
},
6229
{
63-
"url": "https://docs.python.org/3/library/doctest.html",
64-
"description": "doctests"
30+
"url": "https://www.digitalocean.com/community/tutorials/how-to-write-doctests-in-python",
31+
"description": "DigitalOcean: How to Write Doctests in Python."
32+
},
33+
{
34+
"url": "https://nedbatchelder.com/blog/201803/is_python_interpreted_or_compiled_yes.html",
35+
"description": "Ned Batchelder: Is Python Interpreted or Compiled? Yes."
6536
}
6637
]

exercises/concept/guidos-gorgeous-lasagna/.docs/introduction.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ On the Python track, [variables][variables] are always written in [`snake_case`]
2424

2525
## Name Assignment (Variables & Constants)
2626

27-
Programmer defined [_names_][facts-and-myths-about-python-names] (also called _variables__) can be bound to any type of object using the assignment `=` operator: `<name> = <value>`.
27+
Programmers can bind [_names_][facts-and-myths-about-python-names] (also called _variables__) to any type of object using the assignment `=` operator: `<name> = <value>`.
2828
A name can be reassigned (or re-bound) to different values (different object types) over its lifetime.
2929

3030

3131
```python
32-
>>> my_first_variable = 1 # Name bound to an integer object of value one.
33-
>>> my_first_variable = 2 # Name re-assigned to integer value 2.
32+
>>> my_first_variable = 1 # my_first_variable bound to an integer object of value one.
33+
>>> my_first_variable = 2 # my_first_variable re-assigned to integer value 2.
3434

3535
>>> print(type(my_first_variable))
3636
<class 'int'>
@@ -62,7 +62,7 @@ Statements for the _body_ of the function begin on the line following `def` and
6262

6363

6464
```python
65-
# The body of this function is indented by 2 spaces, & prints the sum of the numbers
65+
# The body of a function is indented by 2 spaces, & prints the sum of the numbers.
6666
def add_two_numbers(number_one, number_two):
6767
total = number_one + number_two
6868
print(total)

0 commit comments

Comments
 (0)