Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #112: Don't use the greater than sign in programming

Return to episode page view on github
Recorded on Wednesday, Jan 9, 2019.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:05 This is episode 112, recorded January 9th, 2019.

00:09 I'm Michael Kennedy.

00:10 And I'm Brian Atkin.

00:11 Hey, Brian. How you doing?

00:12 I am great. It's a wonderful January.

00:15 We're starting to get back into the swing of things. The news is starting to flow again.

00:19 Yes.

00:19 Yeah, absolutely. Now, before we get into it, I just want to say thank you to Datadog for sponsoring the show, as they are many of our shows. So tell you more about them later.

00:29 Right now, I want to just think back to what it was like to have my programming and computer science assignments graded.

00:37 They were like, "Here is an algorithm. Write the output with a pencil on a piece of paper." We've come a long way from there, right?

00:46 Yeah. I mean, I even remember, I guess, turning in floppy disks and code printouts and stuff like that.

00:53 Right. Because what are you going to do? Go for them?

00:55 First thing I want to talk about is a thing called NBGrader.

00:59 So that's short for Notebook Grader.

01:01 This, I just ran across this.

01:03 This is just so totally cool.

01:05 I'm just going to read their little thing.

01:07 There was an article about it in Journal of Open Source Education.

01:12 Beginning of the summary is, NBGrader is a flexible tool for creating and grading assignments in the Jupyter Notebook.

01:18 NBGrader allows instructors to create a single master copy of an assignment, including tests and canonical solutions.

01:26 From the master copy, a student version is generated without the solutions, thus obviating, that's totally a smarty word, anyway, thus obviating the need to maintain two separate versions.

01:37 NBGrader also automatically grades submitted assignments by executing the notebooks and storing the results of the test in a database.

01:45 After auto-grading, instructors can manually grade free responses and provide partial credit using the FormGrader Jupyter Notebook extension.

01:54 Finally, instructors can use NBGrader to leave personalized feedback for each student submission, including comments as well as detailed error information.

02:02 - That sounds super useful.

02:03 - I totally want to play with it, even though I'm not a teacher.

02:06 We're also linking to the NBGrader documentation that has a little intro video on how it all works.

02:12 And wow, it just looks totally cool.

02:14 That seems like an awesome way to grade computer science stuff.

02:18 And you could grade pretty much anything that is reasonable to compute within a Jupyter notebook, right?

02:24 So I guess that people would have to have some Python or some sort of skill where they interact with it, but maybe that could be really simple, like just put an answer or a number or something into a cell that then gets stored and checked.

02:39 But the thing that was kind of a concern for me as you're describing it was, well, what if there's like a super simple mistake you make, and then the answer is way off, so you just get it wrong, right?

02:52 But the fact that you can go back and give partial credit and evaluate it, that sounds pretty cool.

02:57 - Like a lot of the stuff, if you've got tests in place where it just checks their code, and all the people that got it right, you don't have to really go back and double check that stuff.

03:06 Maybe spot check to make sure they're not all writing the same answer or something, but it looks like a lot of fun.

03:12 - Yeah, that's cool.

03:12 I was a TA in college and I had to grade a lot of calculus tests and stuff.

03:16 This seems really lovely compared to the alternative, honestly.

03:20 It's great.

03:21 Sometimes when people are doing their assignments, they can get pretty upset.

03:25 Things aren't working out.

03:26 It's really frustrating.

03:27 Yeah.

03:27 They might even swear.

03:28 They might.

03:29 And they might do it in a public forum, or maybe they do it in a GitHub commit that is going to be public, and you don't want it there.

03:38 So you might want to check that.

03:40 And there's a couple ways, actually, to check for profanity in Python.

03:44 And there's a new library called profanity-check.

03:50 So what's cool about this--

03:52 obviously, you could say, does it have these seven words or whatever.

03:56 But this one takes AI and applies it to this problem, basically.

04:01 It takes a linear SVM model trained on 200,000 human-labeled samples of clean and profane text.

04:11 So this string is bad.

04:13 this sentence is good, this phrase is bad, this phrase is good.

04:17 And then it uses that to understand how similar whatever you're looking at is to something like one of these bad phrases.

04:26 Isn't that cool?

04:27 - Yeah, great.

04:28 - So one of the problems with a lot of the systems out there that are more simple is they just have like a explicitly bad words.

04:34 But as you can imagine, there are many, many bad words that you might forget or there's some slightly different of saying some other thing and they fall through.

04:44 So this one turns out to catch a lot of them.

04:46 And it's also super, super fast.

04:48 So there's another one out there called profanity-filter, which is more sophisticated than a lot of these, you know, like just are these words in here, checks.

04:57 This one is similar, but because it creates this model and just uses the result, it's actually like three to 400 times faster than the other one.

05:06 - That's cool.

05:07 - If you have 300 to 400 times faster, not percent, times, Right, like 13 seconds versus 24 milliseconds type of difference.

05:15 That's pretty awesome.

05:16 - And the speed really matters if you're, especially if the amount of text you're filtering is huge.

05:21 - Right, or a whole bunch of stuff real time or something like that.

05:24 And so it's super simple to use.

05:25 It has basically two functions.

05:27 It calls predict, whether or not something is bad, or give the probability.

05:31 So you can call predict and give it some text and it'll give you like zero or one.

05:36 Or you can say, give me the probability and it'll say this is, we think this is 70 point, you know, 76.3% bad, do without what you will.

05:45 So you can take it as black and white or gray and then just decide how gray you'll let it get.

05:50 - Okay, so I'm like, I'm redoing some, one of my websites.

05:53 Maybe I'll do this on my own blog posts and make sure that I haven't, just curious to see what my confidence level is that they're clean.

06:02 - Yeah, exactly.

06:03 I think a lot of people don't have this problem, but if your problem is to take user input and evaluate it for this characteristic, Like that would be a complete pain, right?

06:11 And so here's a pip install one-liner sort of thing you can do that will help a lot, I think.

06:17 - Yeah, neat.

06:19 - Yes, indeed.

06:19 All right, what's the next one?

06:21 Something we've never talked about on this show, right?

06:23 - We've actually talked, of course, talked about packaging quite a bit.

06:27 So dealing with packages, if you're dealing with Python a lot, like the difference between a module and a package in the file system and then an installable package that you can distribute, that all just becomes second nature and we don't even really think about it anymore.

06:43 But as I'm working with different people and different people are starting to work in Python around you, sometimes you have a, you got somebody that you need to explain this to.

06:52 And it's hard to remember all the, it's hard for me to remember like all, what it was like to not know all this stuff.

06:59 So I bookmarked this, an article called an introduction to Python packages for absolute beginners.

07:05 And it's just a nice gentle discussion about somebody trying to share some code and then describes modules and packages and using packages and installing and what import means and a bunch of stuff like that.

07:18 So I think this would be good either to hand around or just review before you go explain it to somebody.

07:23 - Right, we get so excited about jumping in and talking about Poetry or PipMF or all these other things and it's just like, wait, what are these, you know, when you're new, it's like, what are these things?

07:33 Like, how do I make a package?

07:35 You know, how do I share it?

07:37 You know, people probably start out with just like one giant Python file.

07:41 And like, that's the whole, the whole app is just crammed into the one file even.

07:45 Right.

07:45 And people share the code by just emailing it around or copying it into different repos and stuff.

07:51 And there's, yeah, there are better ways.

07:54 To me, it's a little annoying that the word package has multiple meanings because it's Python calls just a directory within a knit in it.

08:03 That's a package.

08:05 But that's not what PyPI is full of.

08:08 - Right.

08:09 - Distributions and stuff. - Like wheels and all that stuff, right?

08:12 Like, yeah, a whole nother level.

08:13 I do agree that those are like oddly the same and different.

08:16 Yeah, it's definitely confusing.

08:18 - So this is good.

08:19 - So if you're confused about how your app is working, we know a company that can help, right Brian?

08:24 - Yes, we do.

08:25 - Datadog.

08:26 So Datadog sponsored the show, as I said at the opening.

08:28 They're a cloud scale monitoring platform that brings together all your metrics, logs, distributed traces all into one place.

08:35 and it will auto instrument things like Django or Flask or Postgres and let you track requests across those different pieces of infrastructure and put them all back together to know why it was slow, where it was working, things like that. So that's pretty awesome.

08:49 Check them out at pythonbytes.fm/datadog Go do a free trial and they will send you a cool Datadog t-shirt.

08:57 So definitely check them out. It helps support the show.

08:59 Plus the t-shirts are cool.

09:01 And the t-shirts are very cool. They have a cute little dog on them.

09:03 Now, I'm going to bring up something on here that we don't spend a whole lot of time on and it may be it's even a little bit controversial.

09:11 What do you think?

09:12 I'm looking forward to talking about this.

09:13 Yeah, I figured you are.

09:14 I figured you have an opinion one way or the other.

09:17 So the idea is in Python, we can usually get away with replacing our dependencies.

09:26 Like if we're talking to a database or a web service, we can, you know, kind of cancel that out so we can test our code by doing like some sort of patch operation or something to that effect, right, we can get it out of the way.

09:38 But this guy named Yasha good sir, hopefully I got that closely right.

09:43 So there's a message that said, Hey, I've been reviewing all of the Python dependency injection and IOC and version control containers around Python.

09:53 And I know that some folks say it's not even necessary.

09:56 on large apps, I think there's a lot of value in making your dependencies more explicit.

10:01 - Interesting.

10:02 - Yeah, so he sent us a big long list of all the options, basically.

10:04 And he did a bunch of good research for us.

10:07 - Awesome.

10:08 - Yeah, so I'll just read off a couple of them.

10:10 Here we got five or six.

10:12 So we have one called Dependency Injector, which apparently requires some tricks to get installed on Windows, but he couldn't get it quite working.

10:20 But it looks pretty good.

10:21 I'm kind of mediocre on that one.

10:23 There's Injector, which is fairly Java-esque.

10:27 There's Pinject, probably P-I-N-J-E-C-T, something like that.

10:34 And this one had kind of gone unmaintained, but there's, for like five years, long time.

10:39 But now there's new folks working on it, so that's kind of cool, and it seems like it's doing a lot.

10:45 There's Python Inject, which has got some really nice testing features.

10:50 It's got like built-in mocking stuff and things like that.

10:53 Are you starting to notice a similarity in the name?

10:55 Naming?

10:57 - Yeah.

10:58 - There's another one that's just here more for completeness sake, dipy, but it only works on Python 3.4 apparently, so appreciate the comment here is like, this is a legacy, so I can't really be touching on this.

11:12 Like, that's no good.

11:13 And then the next two I think are really quite good.

11:15 There's serum, which I think actually is a pretty interesting thing to look at because what it does is it primarily is driven through class decorators.

11:27 Okay, so what you do is you go to like some class here and you say this class is a dependency.

11:35 So you put an @dependency on to the class definition.

11:39 And then later on, you can put an @inject on top of either a function call or a class.

11:46 And if the class has like say, like a log field, a class level log field, it will automatically be set to an instance of that dependency based on the type annotation.

11:58 There's an interesting way that it kind of uses type annotations and class decorators to link that back together.

12:04 Yeah.

12:04 OK.

12:05 OK.

12:05 And then the final one is this thing called HAPS.

12:08 And HAPS is pretty cool, and it's really lightweight and quite simple, also based on type annotation.

12:15 So a lot of them are taking advantage of the--

12:17 I think it's probably either 3.5 or 3.6.

12:19 So I think it's 3.6 because of some of the ways it's using type annotations.

12:22 But the point is using the modern features of Python 3 to help figure out a lot of the configuration and how stuff wires together.

12:32 That's the survey that Yosha gave us.

12:36 Thank you for that.

12:37 That was cool.

12:38 Now, you want to have a quick chat about whether Python needs dependency injection?

12:42 What do you think?

12:43 I'm still confused as to what the problem is that it's trying to solve is my thing.

12:48 I hear you.

12:49 Let me try to talk about the other side, although I find myself not doing this very often, so for what it's worth, I don't do dependency injection a lot.

12:57 So I think the fundamental, let's do it a couple steps.

13:00 I think the fundamental starting point is it's trying to write object-oriented Python or even functions following the open-close principle, which is one of the solid principles.

13:11 And it's pretty interesting, this principle.

13:13 It says that software entities like classes and functions should be open for extension but closed for modification, which is like, what the heck does that mean?

13:21 Basically, I should be able to change the behavior of this class or this function without touching the source code to modify it, which kind of sounds like wait, how do you do that?

13:30 How's that possible?

13:31 But imagine like it has like a logging feature.

13:35 Instead of just internally creating one, if you could pass in the logger, you could pass in different loggers changing the behavior of how it logs, right?

13:42 So open close principle, that's how it works, right?

13:44 I think the general motivation for all of these frameworks is they're like, that's cool, I wanna do that, it's good for testing because I could pass in like a fake logger or like a mock database, I could pass that in, right?

13:56 And not touch the database.

13:58 And I think that's generally a good feature, a good way to do things.

14:02 The problem is, if you do that at low level stuff and at all the different layers of your app, at the top you gotta pass like 20 things to the top level things so it can like distribute them down as it creates all the objects further down the graph, right?

14:14 So then people have come up with IOC containers, which like, get registered for what I need one of these, I really give it one of those, and then I create this object by giving it three of these things at once.

14:25 And that starts to get really hard in my mind to know like, okay, what is being done here?

14:32 Like I see a bunch of abstract types and I can't even tell.

14:35 - An example of like, you don't know what database you're gonna use.

14:39 Another, you can do the injection thing, but it kind of ripples through a whole bunch of layers of code is the part that I don't like.

14:47 Whereas another way to do this is to kind of bypass all of the middle stuff and at a top level have, and like Flask, I think Flask does this sort of a thing.

15:00 And this is a common design is to define, instantiate the real objects at an application level, and just set those where they need to be set.

15:11 So there's like a, whatever the real database is.

15:13 Right. Go look up the service for the database and everybody can ask that thing to give it the database, right?

15:18 And then everybody just uses the same interface, and we don't need to pass it through all the levels of constructors and stuff.

15:25 It can just kind of bypass all of that.

15:27 I guess then because that's how I generally do things.

15:31 And then for testing, yeah, I'm okay with patching and monkey patching and stuff like that.

15:37 So I hear you.

15:38 I think in Python, it is certainly something that's open more for debate because we do have these alternative ways to accomplish the same thing like monkey patching.

15:46 Now I don't know, I'm kind of a fan of the open close principle in general, but I do think it can just become like too much when you put it all together.

15:56 And certainly I've worked on some applications that did this all over the place, and it was some of the most frustrating code I've ever had to work through, because it was just like every step.

16:05 There's four things working together, and I don't know what any of them are right now because of some configuration setting somewhere other than that.

16:13 So I don't know.

16:14 I'm kind of on the fence.

16:16 Some parts of this I think are cool, and some I think can go too far.

16:20 But I guess check out HAPS if this kind of stuff is interesting to you.

16:23 It is pretty well done.

16:24 I think that one of the places for it is if people are really used to using this kind of a model, and then coming to Python, yeah, you can do it here too.

16:32 It's just I'm not sure I'm there.

16:34 Yeah, I think there's simpler things in IOC containers, but this podcast is probably a little short if we're going into them.

16:40 But it's certainly an interesting thing to think about, and here's a bunch of options.

16:44 Yep, cool.

16:45 You know, after all that, Brian, I feel like I just need something gentle, like a gentle conversation about a soft, fuzzy animal.

16:52 Yeah, like a gentle introduction to pandas.

16:55 Yes, well, maybe not an animal, but yeah, something gentle. Tell us about pandas.

16:58 So this is another kind of a newbie thing, but we're starting to use pandas data frames at work, and I really kind of needed a "pretend I'm just starting out," which I am, and kind of tell me how these things work.

17:14 And so this is a, it's called a gentle introduction to pandas, but it's really a gentle introduction to the data structures, series, and data frame.

17:23 The series are interesting. I think it's just a precursor to try to jump you into data frames.

17:29 That's where the real fun gets starts to happen. Goes through about a half an article talking about arrays, series, how do you create series from arrays and dictionaries. And I didn't know you could create a series from just a scalar and give it a different index and it'll like fill it in.

17:47 That's pretty cool.

17:48 Oh, that is cool.

17:49 Yeah.

17:50 But then it jumps into data frames and then talks about sorting and slicing and how do you select things by label or position.

17:57 And then one of the things and how easy it is to get the statistics on columns and then how to get things in and out of data frames.

18:06 So importing and exporting.

18:08 And then, you know, where you take it from there is depends on your problem space.

18:12 But this is kind of a really good, why do we call these things data frames and why do we care about them.

18:17 If you need to understand them, this is a decent article.

18:20 - Yeah, if you need to understand them, 15 minutes.

18:22 This is kind of a no-fluff, keep it simple one.

18:26 Nice little article by Wilson Busaca.

18:28 Hold on.

18:29 Let's see, Medium tells me it's a five minute read, but I bet Medium's not taking into account the code.

18:35 So 15 minutes, how about that?

18:36 - Yeah, I think so.

18:37 - Right, so this last one I have for you, Brian, I think it's gonna be a little bit of a shock.

18:44 It'll come across a little bit weird at first, But the more you look at it, the more it starts to sound appealing, let's say.

18:50 Yeah.

18:50 All right, so I'm going to give you some advice.

18:52 I'm going to tell you a bit about it.

18:53 So the advice-- you also get all sorts of advice, like don't format your code like this.

18:59 Don't have a bunch of multiple--

19:02 if this is equal to this value and that value and that value, maybe do an end test.

19:07 So there's like sort of Pythonic ways to do conditionals and whatnot.

19:11 The advice here is to never--

19:13 not almost never-- says don't use the greater than sign in programming.

19:18 - Yeah. - It's crazy, right?

19:19 - It seems like kind of a bold statement.

19:21 I'm like, well, we have it.

19:22 It must be useful somewhere.

19:24 - It must be useful, and why would we not wanna use it?

19:27 So this is an article by a good friend of mine, Llewellyn Falco, who I've known for a long time, but someone else sent me this article, which I thought was a pretty interesting coincidence.

19:37 And Llewellyn has a really interesting way of looking at straightforward stuff and then just getting it down to its essence.

19:46 So he says, "Let's look at this problem.

19:48 "Let's suppose I wanna check whether a number, "let's call it x, it's a variable, "is between five and 10." There are a lot of ways that we can do this.

19:58 We could say x greater than five and 10 greater than x, or we could say x greater than five and x less than 10.

20:06 Those are equivalent, but why should you choose one over the other?

20:11 Well, he lists off these six different ways of doing this.

20:15 So it's actually, here's all the ways.

20:16 Oh no, wait, look, one of them is wrong.

20:18 Go back and figure out which one is wrong.

20:20 And it's like not very obvious.

20:22 You know, you kind of got to go through and think through every little bit.

20:26 All right, so this is, look, if you remove the greater than sign, there's actually only two ways to say this.

20:32 X less than 10 and five less than X, which is kind of weird, or five less than X and X less than 10.

20:39 So in that last one, it's cool because the variable you're trying to test between five and 10 is literally between the five and the 10 in that statement.

20:48 Like it's in text, it's between, and it's actually between.

20:51 So here you can test like this containment interval bit completely with the no greater than.

20:57 - That's how I code.

20:58 I think of, especially, well, especially with numbers, I think of the, that all of the comparisons need to kind of be on the number line.

21:07 You can think about them easier.

21:09 I've never really seen it as put in place as a rule, kind of a rule of thumb of just don't use the greater than sign.

21:15 - Yeah, it's really interesting.

21:16 And this analogy back to the number line is perfect 'cause it's like, well, where do you want the variable to be relative to this?

21:22 So if you want it to be between, then as you say, like five less than X, X less than 10, right, so it's between.

21:29 If you wanna test that it's outside there, you could do the same thing, X less than five or 10 less than X, and you put the variable outside the numbers, right?

21:37 So you can do this number line sort of relative bit with both and and or and containment and not contained in and things like that.

21:45 We'd kind of be remiss if we didn't mention that this article is referencing all programming languages.

21:51 If you're doing Python, of course, you would just say, five is less than x is less than 10.

21:56 You don't need the and.

21:57 Nice.

21:58 And also somebody said, OK, I'm all for I follow you on this.

22:02 This is great.

22:04 And I'm with you.

22:06 "How do you say I would like all the numbers "greater than one without the greater than sign?" And so the answer is, of course, one less than X.

22:16 - Yeah, there's times where it's a little, that's why it's not, it's more of a rule of thumb, I think, because there's times where it just, it doesn't look right, and you have to go for maintenance.

22:27 If it just looks weird, then change it.

22:30 - I brought this in because I thought it was interesting, and when I first read it, I'm like, "Well, that's dumb advice. What is this?" You know what I mean?

22:37 And I read it, and I'm like, "Actually, no, this makes a lot of sense." A lot of the time, but it's...

22:42 I agree, if you have one thing, you want to say, "X is greater than 1," you know, don't twist around so you don't have to have the greater than sign.

22:48 Just, like, say the most straightforward thing.

22:50 But if you're doing more complicated comparisons, then I think it's worthwhile.

22:54 Yeah. Like, I would say, like, for instance, a series of if clauses, if you have a...

23:00 And you're not really testing both ends if you're doing like, if X is greater than the max, then do something.

23:07 And if all the comparisons have X on the left, I wouldn't change it just because of this.

23:11 But, you know, anyway.

23:12 All right, Brian, well, that's it for all of our main topics.

23:15 I got a few extras to share with everyone while we're here, just really quick and short things.

23:19 And of course, not be forgotten as our joke.

23:21 But you got any extras to share with everyone?

23:23 I did mention last time that I was having some issues with Python testing.net.

23:28 I think I mentioned that.

23:29 but with SSL and stuff, but that's all, that's all resolved and fixed.

23:34 - Wait, wait, wait.

23:34 So if I go over here and I pull this up in Chrome, is it gonna tell me that it's secure?

23:40 - Should.

23:41 - Nice.

23:42 Yeah, testing code over SSL, beautiful.

23:44 - It's now, it's still kind of a WordPress thing is what I use, and I'm not thrilled with that.

23:48 So I have a side project going on to convert that to something else, but it's not urgent anymore.

23:54 - Yeah, that's good.

23:55 Well, you'll have to give us the full report once you get it all fixed up.

23:59 - Okay, so you said you got a bunch of stuff for us.

24:01 - I do, I'll go through them quick.

24:02 First of all, there's a new Python podcast, which is pretty exciting.

24:05 And this one is focused on teaching Python.

24:09 And do you know what the name of it is?

24:10 - I think it's probably Teaching Python?

24:12 - Yeah, it is.

24:13 So, Teaching Python, it's by Kelly Perdez, and Sean Tibor, sorry about messing up the names, but they're doing a podcast.

24:21 These are two middle school teachers who are learning and teaching Python to their students and basically documenting that journey.

24:28 So if you're interested in that, especially if you're a teacher or you work with kids, I think this will be really, really helpful for you.

24:34 So you can check that out.

24:35 - I'm about halfway through the backlog so far, and I really like it so far.

24:40 - Yeah, they're doing a nice job.

24:42 One of the things that had kept people from using GitHub for their private work was that you had to pay for private repositories on GitHub, no matter what. - Yes.

24:53 - Right, so people would use Bitbucket 'cause Bitbucket had free private repositories.

24:57 - And well, GitHub decided we're also gonna have free private repositories.

25:02 So if you're working on projects that they have to stay private, or you just want them private, you can now use GitHub without paying anything.

25:09 - There's been some weird reactions to it, but they're just sort of following the model of Bitbucket and GitLab now, so I don't think there's anything weird going on.

25:18 - Exactly.

25:19 Competition is a good thing, and here we have it.

25:21 So it's not like entirely free, it's not like GitHub decided they're not gonna make money anymore.

25:26 you can only have three contributors to the private repository, and so there's limits and things like that.

25:31 But still pretty cool for most things.

25:34 - Yep.

25:35 - All right, also, very quickly, some early details about EuroPython are available, and it's looking pretty sweet.

25:41 I'd love to go.

25:42 I don't know if I'll be able to.

25:43 - Yeah, me too.

25:44 - Yeah, so they just announced EuroPython.

25:45 It's gonna be in Basel, Switzerland, July 8th to 14th, and it looks great.

25:51 So I put a link to the conference site there.

25:55 I don't think they have call for papers or anything like that out yet, but it should be out pretty soon.

25:59 Another thing that has been lacking in the world is good data center support in Africa.

26:07 So I know this because I used AWS to deliver the video course content, like actual the videos.

26:15 And I have streaming servers all over the place, like in Brazil or Mumbai or whatever, but there was just no way to do that in Africa.

26:23 So the big news is there's an AWS data center coming to South Africa, which is pretty cool for anyone that wants to be closer to that part of the world.

26:33 And finally, Pandas is dropping legacy support.

26:37 No more Python 2 in Pandas.

26:39 - Oh, cool.

26:40 - Yeah, and that's coming out this month.

26:42 So it should be good.

26:44 - Yeah, this is the year that a ton of projects are dropping Python 2.

26:47 - Yeah, for sure.

26:49 So one more major thing, We already covered how cool pandas is.

26:53 It's not gonna support legacy Python anymore.

26:56 All right, you ready for the joke?

26:58 - Yeah, can I click on it now?

27:00 - You can click on it.

27:00 This is a visual one, but I can describe it to you folks.

27:03 Now, I just gotta do a quick little bit of history here for people who maybe have not seen Harry Potter.

27:09 So this is the Harry Potter joke.

27:11 And there's a point in the Harry Potter movie, I think this might be the first one, where Harry Potter has to get on this like long table and he's battling, I don't know, someone, something, and all the other students are standing around, and somebody conjures a snake, a serpent, and in the real show, Harry starts speaking to the thing in its native tongue, which apparently is a freaky thing to do, and people were all freaked out, and it was called a parcel tongue, something like that, that he could speak snake.

27:41 So with that, here's the joke.

27:43 So there's a picture, Harry's fighting the snake in that environment, and he says, "In Porto, current path equals os.getcurrentworkinter and just start speaking out Python commands at the snake.

27:54 And Hermione says, "I didn't know Harry spoke Python." And Ron Weasley says, "Yeah, he's a parser tongue." [laughter]

28:04 That's terrible.

28:05 It's really bad. It's really bad.

28:07 But there it is. And Nick Spirit sent that to us.

28:10 So thank you, Nick, for finding that joke and letting us share it here.

28:13 Yeah, very nerdy.

28:14 Yep, he's a parser tongue.

28:16 Well, I think we're going to leave it at that, Brian.

28:19 Thanks for being here.

28:19 Yeah, thank you.

28:20 Yeah, bye.

28:21 Thank you for listening to Python Bytes.

28:23 Follow the show on Twitter via @PythonBytes.

28:25 That's Python Bytes as in B-Y-T-E-S.

28:29 And get the full show notes at pythonbytes.fm.

28:32 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.

28:36 We're always on the lookout for sharing something cool.

28:39 On behalf of myself and Brian Aukin, this is Michael Kennedy.

28:42 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page