Skip to content

Commit

Permalink
rm at this point unnecessary 'if __name__ == "__main__"'; fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Feb 20, 2017
1 parent 376b31e commit 0d2c272
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions _episodes/01-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ Now, create a new file called **runner.py**

``` python
from hello import say_hello
if __name__ == "__main__":
say_hello()

say_hello()
```

Test that it works
Expand Down Expand Up @@ -559,8 +559,8 @@ Now edit the file hello.py so that it looks as follows (i.e. add a comment):
```python
# i am a comment
from hello import say_hello
if __name__ == "__main__":
say_hello()
say_hello()
```
And run **git status again**.
Expand Down
8 changes: 3 additions & 5 deletions _episodes/03-branching.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,7 @@ def say_something(something):
import sys
from hello import say_something

if __name__ == "__main__":
say_something(sys.argv[1:])
say_something(sys.argv[1:])
```

**Verify that the code works**
Expand Down Expand Up @@ -582,9 +581,8 @@ index bdab4ae..651d1a3 100644
+import sys
+from hello import say_something
+
if __name__ == "__main__":
- say_hello()
+ say_something(sys.argv[1:])
-say_hello()
+say_something(sys.argv[1:])
Stage this hunk [y,n,q,a,d,/,s,e,?]?
```

Expand Down
3 changes: 1 addition & 2 deletions _episodes/x1-moving_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ index 651d1a3..6f6f54b 100644
-from hello import say_something
+from say import say_something
if __name__ == "__main__":
say_something(sys.argv[1:])
say_something(sys.argv[1:])
```

Go ahead and make the change and commit.
Expand Down

0 comments on commit 0d2c272

Please sign in to comment.