@@ -196,7 +196,7 @@ Section 3.4 Introduces module imports. The file written in Section
196
196
may need to help students fix issues with IDLE, sys.path, and other
197
197
assorted settings related to import.
198
198
199
- Section 3.5 talks about __ main__ and script writing. There's a bit
199
+ Section 3.5 talks about ` __main__ ` and script writing. There's a bit
200
200
about command line arguments. You might be inclined to discuss a
201
201
module like argparse. However, be warned that doing so opens up
202
202
a quagmire. It's usually better to just mention it and move on.
@@ -256,8 +256,8 @@ commonly used in libraries and frameworks--especially in situations
256
256
where more control over what a user is allowed to do is desired.
257
257
258
258
An astute Python master will notice that I do not talk about advanced
259
- topics such as descriptors, or attribute access methods (__ getattr__ ,
260
- __ setattr__ ) at all. I have found, through experience, that this is
259
+ topics such as descriptors, or attribute access methods (` __getattr__ ` ,
260
+ ` __setattr__ ` ) at all. I have found, through experience, that this is
261
261
just too much mental overload for students taking the intro course.
262
262
Everyone’s head is already on the verge of exploding at this point and
263
263
if you go talk about how something like descriptors work, you’ll lose
@@ -285,7 +285,7 @@ and think about streams, large datasets, etc.
285
285
286
286
Some omissions: Although the iteration protocol is described, the
287
287
notes don’t go into detail about creating iterable objects (i.e.,
288
- classes with __ iter__ () and next()). In practice, I’ve found that
288
+ classes with ` __iter__() ` and ` next() ` ). In practice, I’ve found that
289
289
it’s not necessary to do this so often (generators are often
290
290
better/easier). So, in the interest of time, I’ve made a conscious
291
291
decision to omit it. Also not included are extended generators
@@ -329,7 +329,7 @@ follow.py, etc.). Two main goals in this section. First, put all of
329
329
the code into a Python package structure. This is only a gentle
330
330
introduction to that, but they'll move the files into a directory and
331
331
everything will break. They'll need to fix their import statements
332
- (package relative imports) and maybe fiddle with an __ init__ .py file.
332
+ (package relative imports) and maybe fiddle with an ` __init__.py ` file.
333
333
Second goal, write a simple setup.py file that they can use to package
334
334
up the code and give it away to someone. That's it. End of the
335
335
course.
0 commit comments