Jump to content

Episode 12 errata:


G+_Lee Crocker
 Share

Recommended Posts

Episode 12 errata:

 

1. Padre added a semicolon at the end of his first list, and implied that it was necessary. It's not.

 

2. Dale got the syntax for a new empty list wrong. It's:

 

    newlist = []

 

3. Dale's big error: changing a list while iterating over it is a big no-no in every language unless you know exactly what you're doing. He chose the wrong kind of loop for what he wanted to do.  If you want to use a loop like:

 

    for value in mylist:

        . . .

 

Changing the list out from under yourself will do weird things, as Dale saw. You're asking the program to give you each element in turn, but then changing the list while it's trying to do that. If you want to delete from a list inside a loop, you'll have to use a loop not based on counting through the items. One way is just pop until you drop:

 

    while mylist:

        v = mylist.pop()

 

This will just pop until it's empty. Another way might be to get the length of the list up front, and loop that many times by number:

 

    for index in range(len(mylist)):

        v = mylist.pop()

Link to comment
Share on other sites

A successful formula for many great podcasts is an expert and one or more enthusiasts who can ask the expert questions and better relate to the audience. Think SGU: Dr. Novella with the rogues, Star Talk: Dr. Tyson plus a comedian. Security Now: Steve and Leo. SN wouldn't work without both. You need the expert understanding and you need humor and audience sensitivity. This episode had no expert. Snubs & Padre are entertaining, and Padre knows a little of the subject. I don't know what Dale's expertise is, but it's clearly not Python. The C# episodes had Lou, who was pretty good. If he's not a Python guy, then you need to find one. I don't expect Guido, but at least someone at Lou's level or better.

Link to comment
Share on other sites

 Share

×
×
  • Create New...