Skip to content

Commit a4ea11e

Browse files
authored
Merge pull request #1 from kyclark/master
will this work
2 parents 54c29f9 + 0e73a0d commit a4ea11e

5 files changed

Lines changed: 12 additions & 15 deletions

File tree

‎05_howler/test-outs/sonnet-29.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
SONNET 29
22
WILLIAM SHAKESPEARE
33

4-
WHEN, IN DISGRACE WITH FORTUNE AND MEN’S EYES,
4+
WHEN, IN DISGRACE WITH FORTUNE AND MEN'S EYES,
55
I ALL ALONE BEWEEP MY OUTCAST STATE,
66
AND TROUBLE DEAF HEAVEN WITH MY BOOTLESS CRIES,
77
AND LOOK UPON MYSELF AND CURSE MY FATE,
88
WISHING ME LIKE TO ONE MORE RICH IN HOPE,
99
FEATURED LIKE HIM, LIKE HIM WITH FRIENDS POSSESSED,
10-
DESIRING THIS MAN’S ART AND THAT MAN’S SCOPE,
10+
DESIRING THIS MAN'S ART AND THAT MAN'S SCOPE,
1111
WITH WHAT I MOST ENJOY CONTENTED LEAST;
1212
YET IN THESE THOUGHTS MYSELF ALMOST DESPISING,
1313
HAPLY I THINK ON THEE, AND THEN MY STATE,
1414
(LIKE TO THE LARK AT BREAK OF DAY ARISING
15-
FROM SULLEN EARTH) SINGS HYMNS AT HEAVEN’S GATE;
15+
FROM SULLEN EARTH) SINGS HYMNS AT HEAVEN'S GATE;
1616
FOR THY SWEET LOVE REMEMBERED SUCH WEALTH BRINGS
1717
THAT THEN I SCORN TO CHANGE MY STATE WITH KINGS.

‎22_itictactoe/solution1.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ def main() -> None:
2828
elif state.winner:
2929
print(f'{state.winner} has won!')
3030
break
31-
32-
state = get_move(state)
33-
34-
if state.quit:
31+
elif state.quit:
3532
print('You lose, loser!')
3633
break
3734
elif state.draw:
3835
print("All right, we'll call it a draw.")
3936
break
4037

38+
state = get_move(state)
39+
4140

4241
# --------------------------------------------------
4342
def get_move(state: State) -> State:

‎22_itictactoe/solution2_typed_dict.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ def main() -> None:
3333
elif state['winner']:
3434
print(f"{state['winner']} has won!")
3535
break
36-
37-
state = get_move(state)
38-
39-
if state['quit']:
36+
elif state['quit']:
4037
print('You lose, loser!')
4138
break
4239
elif state['draw']:
4340
print('No winner.')
4441
break
4542

43+
state = get_move(state)
44+
4645

4746
# --------------------------------------------------
4847
def get_move(state: State) -> State:

‎appendix_argparse/README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ https://www.youtube.com/playlist?list=PLhOuww6rJJNNx06soCkb4aMFhuioQ7tY5
44

55
This is a collection of example programs to show how you can use the standard Python module `argparse` to handle command-line aruguments.
66

7-
* `sys_argv.py`: sys.argv
87
* `one_arg.py`: one positional argument
98
* `two_args.py`: two positional arguments
109
* `nargs2.py`: another way to handle two positional arguments

‎inputs/sonnet-29.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
Sonnet 29
22
William Shakespeare
33

4-
When, in disgrace with fortune and men’s eyes,
4+
When, in disgrace with fortune and men's eyes,
55
I all alone beweep my outcast state,
66
And trouble deaf heaven with my bootless cries,
77
And look upon myself and curse my fate,
88
Wishing me like to one more rich in hope,
99
Featured like him, like him with friends possessed,
10-
Desiring this man’s art and that man’s scope,
10+
Desiring this man's art and that man's scope,
1111
With what I most enjoy contented least;
1212
Yet in these thoughts myself almost despising,
1313
Haply I think on thee, and then my state,
1414
(Like to the lark at break of day arising
15-
From sullen earth) sings hymns at heaven’s gate;
15+
From sullen earth) sings hymns at heaven's gate;
1616
For thy sweet love remembered such wealth brings
1717
That then I scorn to change my state with kings.

0 commit comments

Comments
 (0)