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

Transcript #135: macOS deprecates Python 2, will stop shipping it (eventually)

Return to episode page view on github
Recorded on Wednesday, Jun 12, 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 135 recorded June 12th, 2019. I'm Michael Kennedy.

00:10 And I'm Brian Akin.

00:11 And I'm Max Sklar.

00:12 Yeah, welcome to the show. It's great to have you here.

00:14 Good to be here today.

00:15 You're here. You've got your own podcast and we're definitely gonna talk a little bit about that at the end and that'll be great. I do, before we kick things off, though, also want to say thank you to DigitalOcean for sponsoring the show. Check them out at More about them later as well.

00:28 Okay, so Rufin Lerner has a he's got an email list that I'm signed up to. One of the things that he pointed out in one of the recent, I can't remember if it was on his email list or if it was on one of his blog posts. So I'm linking to a blog post. But it's this idea that I didn't even know you could do this. It's titled Why do Python lists let you do plus equals or in place assigned addition with a tuple. We can't do plus with a tuple. So here's the idea is you got, you got a list.

00:58 and you want to add, combine the elements of a list and a tuple, end up with a list at the end.

01:03 You can't just add them, because they're different types.

01:07 But you can do incremental add, and it's just weird.

01:12 I was like, I didn't know you could do that.

01:14 But it turns out, it's a little surprising, but just as because the plus equals is not, I always think of it as equivalent to, like x plus equals one is the same as x equals x plus one.

01:28 That's what I thought.

01:29 But it turns out it's actually a different, it's a different call.

01:32 It's implemented as a different call.

01:33 I see like a different Dunder method, like a different magic method is being called.

01:37 Yeah.

01:38 And the Dunder method for list increment or in place add is what it does is it takes any iterable on the right-hand side and adds it one element at a time to the left side, so you can plus equals any iterable onto a list.

01:53 That's neat.

01:54 I didn't know you could do that.

01:55 That's cool.

01:56 This is so weird.

01:57 I mean, it's cool and it's fine that += will do that.

02:01 And I actually just tried it.

02:02 I created a list of a bunch of numbers and then I += it with a string.

02:07 And now I have a list that's full of numbers and single characters that made up that string, which is, which is, it's okay if that's the behavior.

02:14 And it seems actually like the most reasonable behavior.

02:16 But then why can't you just + them, right?

02:18 Like, it seems odd that it's inconsistent.

02:20 Plus, it seems like it should just create another list with that same behavior.

02:25 So, yeah, not sure.

02:26 Yeah, exactly.

02:27 I assume there's a better way to turn a tuple into a list, but now that I'm looking at this, you could just create an empty list and then do plus equals your tuple.

02:36 There you go, your conversion.

02:39 It's all filled up.

02:40 Yeah, it's definitely not the most obvious way.

02:43 Probably the initializer constructor of the list is best, just pass it the iterable.

02:47 But yeah, this is interesting.

02:49 Also if the three of us didn't know you could do this, probably don't do this in your code because nobody will understand it.

02:56 It's interesting.

02:57 Yeah. Also, please don't put this in a job interview.

02:59 Yeah.

03:02 Don't make this one of these things.

03:05 Oh, one of those questions that you mean an interview question?

03:07 Yeah, exactly. Like what form of sort does a list use?

03:11 What does a list plus a tuple mean?

03:14 What is list plus equals?

03:15 No, this belongs in a Watt talk, not in a job interview.

03:20 Yeah, definitely.

03:21 I think this is interesting because Python is mostly devoid of these weird oddities.

03:27 It's mostly a pretty polished, simple, clean language.

03:30 But yeah, this is weird.

03:31 Gary Bernhardt could incorporate this into the talk, I'm pretty sure.

03:35 Nice.

03:36 All right.

03:36 Speaking of jobs and growth and things that you might actually want to pay attention to or decide on, Max, what's this next one you got?

03:44 This is an article called R versus Python.

03:47 R is out of the top 20 languages despite statistical boom.

03:51 And I know you guys have covered on the show before the whole R versus Python dynamic, all these articles coming out, this is, I'm not going to be anti R here, but even though I'm a Python guy, so the article is about an index on the popularity of programming languages and this organization, TIOB does one, I know that there could be, I imagine that there's some controversy around how to rank them.

04:14 I'm just going to assume that they're doing a pretty good job.

04:16 There's a few stories here, a few headlines.

04:19 The first is that Python hit an all-time high.

04:21 It's now language is at ranking number three on the chart.

04:26 So it's just beats out, it beats out C++, I believe for the first time.

04:31 Only Java and C are more popular than Python.

04:35 And the other story is that the statistical language R dipped to number 21.

04:41 And so the speculation is that Python has sort of taken over as the preferred statistical language to R. And then personally, I got into Python, because I kind of came at data science and ML from a from a software development perspective. I took CS, I learned C and Java.

04:56 And so going over to Python was came a lot more naturally to me than going over to R.

05:01 If you were say a statistician, maybe, yes, coming from R makes more sense, right? Or from MATLAB or something like that, right?

05:07 Yes, yes. And I have worked with and met people who do that. And they have probably extra skills that I don't have, like they could do certain things a lot faster.

05:16 So again, I'm not like anti-R, but I'm just, I think from the programmer's perspective, Python is a lot nicer for some people, people like me.

05:25 So personally, I'm going to stick with Python because there's so many statistical libraries that even I have yet to learn and it's served me very well.

05:31 Thus far.

05:32 And then the third thing I wanted to point out the language that I use most in the recent years in is Scala.

05:37 And that's surprisingly down at 31, which I looking at companies around here in New York at like startups, there's a lot that use Scala.

05:44 So I was surprised it was that low, but well, I feel like Scala and those functional languages, they tend to be very popular in the financial space, right?

05:52 Maybe.

05:53 Yeah.

05:53 You definitely are in the center of that and being in New York, right?

05:56 Yes.

05:56 But a lot of, you know, Foursquare where I worked for a long time was Scala based, Twitter.

06:01 So there's a lot of, companies like that, social media, consumer app companies that use it.

06:06 So why do you think this is?

06:08 Why do you think Python is?

06:10 I mean, you talked about why you were more comfortable with it, but it's a general trend.

06:14 Even people who are scientific are taking up Python at much larger numbers.

06:19 Why do you think that is?

06:20 When companies actually want to apply machine learning or statistical methods to their data, they already have a lot of engineers and developers.

06:30 And if you already have people who are fluent in Python, then why not use Python?

06:37 Python has a lot of great libraries, NumPy is really great, and then a lot of the more sophisticated machine learning libraries are really great.

06:45 So there's too many benefits, I think.

06:47 Yeah, I definitely agree with that.

06:48 I think another one has to do with the fact that Python is a full spectrum language.

06:53 Like I can come with a very partial understanding of what Python is and what it does.

06:57 And I can still be productive.

06:59 I can if I know how to pip install a thing, write code, I need to know what a function or a class is.

07:03 I can do amazing, I could like spin up a machine learning model and do something with it, right?

07:07 But at the same time, that piece can grow and grow into like a fully distributed application or something like that, right?

07:15 Like there's not many languages that start that simple and yet most of the simple languages that they top out and you say, well, now you go do C++.

07:23 I hope you like templates.

07:24 Good luck.

07:25 Yeah.

07:26 I'm still like stumped as to why Java is at the top.

07:30 That is a good question.

07:31 You know what I think?

07:32 - That's a lot of legacy.

07:33 - Yeah, I think that that's true.

07:35 And I think the legacy is in two places.

07:37 I think if you care about open source, but you want a compiled modern language, Java's a pretty good choice.

07:44 Like, you know, C#, C++, those are also good, but C++ is, you know, doesn't have garbage collection, and C# is tied to Microsoft, right?

07:52 So I can see that that's one of the things.

07:55 I also think the academics, Stanford and Carnegie Mellon and all that stuff very much for many, for a long time, taught Java, Java, Java as the way to do things.

08:07 And so the folks at the high end of decision making probably had that experience as well.

08:13 So I don't know, that's my theory.

08:14 - Okay, I'm not sure if there's this article or another one related to this that predict, I don't know if you already covered this, that predicted that Python will be at the top within like four years.

08:24 - Yeah, that it's gonna surpass Java and C.

08:26 Yeah, I mean, just look at the growth curves, right?

08:28 Some are either flat or downward, and Python is like highly up.

08:32 So pretty awesome.

08:33 Very cool to be working in the Python space.

08:35 It's exciting.

08:36 Like every day is super exciting.

08:37 - If like we said, Java is very popular because of, you know, there's a lot of legacy code written in Java, but new projects, I don't know if there's another score for new projects, but I assume that Python is way higher.

08:51 - Yeah, that's probably, it probably is.

08:53 I don't know where to find that either, but it'd be cool to have that data.

08:55 - Yeah.

08:56 - Speaking of exciting, Max, what OS do you use?

08:58 - I'm on macOS.

08:58 - Yeah, so am I.

09:00 so is Brian, even though the majority of Python developers are on Windows, we happen to all be there.

09:04 So we can all appreciate this next one that's coming here.

09:07 So I recently watched the WWDC and somehow I didn't notice this or they didn't announce it, it was just in the fine print but Dan Bader from Real Python sent this over and there was an announcement, at least in the release notes for the new macOS, what is it, Catalina?

09:23 Something like that, whatever their name is it for the new macOS, the one that replaces Mojave.

09:28 It is deprecating Python 2.

09:30 So finally, we have like a super old version of Python running in macOS.

09:35 And if you type Python, you get Python 2.

09:38 It doesn't ship with Python 3.

09:40 Ideally, I would love to see Python 3 shipping, kind of like what the Windows Store and Microsoft is doing as an app that is auto updating and stuff, like a really nice way to get it there.

09:52 Instead, they're just saying, we've decided that Python and all the scripting runtimes, So Pearl and Ruby and Python, those are not our problem anymore.

10:00 We're washing our hands of them.

10:02 That's the announcement.

10:03 We are no longer recommending them.

10:05 It is deprecated.

10:06 We have to leave Python 2 there because stuff is depending upon it, but we do not recommend you use it at all, period.

10:13 Find another way to get it there.

10:15 - Yeah, it is interesting.

10:16 - So on one hand, like that's good news.

10:17 They're like, please don't, I know it has Python on it, but this is a broken old one.

10:21 Don't use that.

10:22 I feel like there's maybe some better way they could approach that.

10:26 I don't know if there'll be some kind of warning when you run it, that would be great.

10:29 But it does make it actually harder to get the right version of Python onto your system.

10:35 Like if you wanna use Homebrew, brew install Python, installs Python 3, but you know what Brew runs on?

10:41 Ruby, I believe, something like that.

10:44 It depends on one of these things.

10:45 So that's also, so like if that's also not there, then how do you brew?

10:50 So there's a bunch of interesting changes here, but I do think it's interesting that Apple and the macOS team are addressing this Python story.

10:56 What do you guys think?

10:57 Yeah.

10:58 Well, when did Python 3 come out, if you could remind me?

11:02 Was it?

11:03 2008.

11:04 Wow.

11:05 But realistically, I feel like 3.4 is where it really started to get traction, and that's more like 2012-ish, something like that.

11:12 OK.

11:13 Yeah, I'm just now I'm thinking, oh, God, I have some scripts in my GitHub that I may want to, that I built like five years ago, I may want to upgrade.

11:22 I think it's a good thing, actually.

11:23 I think it will be a good thing because people that just open up a terminal on Mac and type Python, they get 2.7 and that's not the right answer.

11:33 Yeah.

11:34 Yeah.

11:35 And I've seen this where you always have two versions of Python on your machine.

11:39 And there's always, did this the other day where you run the old version of Python and it doesn't work.

11:44 You're like, oh, I did the, I called the wrong commands.

11:47 And it would be nice to kind of put an end to that.

11:51 So it doesn't waste people's time.

11:52 Yeah, absolutely.

11:53 to put an alias to alias Python to Python 3 inside my startup script.

11:57 Yeah, that's a good idea.

12:00 Interesting.

12:01 Well, I would like a better outcome, but at least there's some kind of like Apple acknowledges how out of date the stuff they're shipping is.

12:08 So that's pretty cool.

12:09 Now before we get on to the next one, I want to talk really quickly about DigitalOcean.

12:13 They've been a huge supporter of the show, and we really appreciate that.

12:17 Our infrastructure runs on DigitalOcean, which is pretty cool.

12:20 So we can definitely recommend it from someone who's using it, right?

12:24 And I want to highlight their hosted database as a service right now.

12:29 So if you want to use Postgres SQL, which is probably the most popular relational database these days in the Python space, you know, you look at the stack overflow survey and stuff like that, it's got a lot of love, and people love it a lot.

12:42 So they have hosted as a service, just go there and say I want Postgres, turn on here's the connection string, they'll do all the backups and scaling and failover and all that stuff for you. So super great. Check them out at and for new users you get a $50 credit to get started, which is also cool. Brian, would you say that dictionaries are important in Python? Yeah, definitely. The whole thing's built on dictionaries. It's turtles all the way down. Exactly. It's turtles all the way down. It's dictionaries all the way down. So what's up with - What's up with this one?

13:12 - This is just a small article from Al Swigert, Pythonic Ways to Use Dictionaries.

13:17 And I thought it was a good reminder because dictionaries really are not, I mean, they're not hard to use.

13:22 People coming from, I guess I came from Perl before Python.

13:26 So I was used to, I guess, what were they called in Perl?

13:30 Hashes.

13:31 - Yeah, hashes and hash maps and all these things, right?

13:33 - Yeah, dictionary is a lookup thing.

13:35 And using them like that is not that hard.

13:39 But there's some gotchas in there that some people try to do weird things to work around them.

13:44 So this is just a highlight article that a few ways to use them smartly.

13:49 One of them is to use the get function for, if you try to retrieve an element out of a dictionary and the element isn't there, the key isn't there, you get a, I don't know, a lookup error or something in a certain keyer.

14:01 But if you know it might not be there, so you can check beforehand, or you can just use the get with a default.

14:08 and the default value will return something other than, if it's not there, it returns something else.

14:13 - That's the primary way that I get stuff out of dictionaries these days.

14:16 I used to do square brackets, but I don't do that anymore.

14:18 It's always about dot get.

14:20 - Yeah, me too.

14:21 - I do that as well, especially since almost every dictionary is either something like a histogram or a sum of something where, the default's always going to be zero, and I don't want to distinguish between that and it not being there.

14:36 The key for me is almost always there's other kind of validation you have to do anyway.

14:42 So I'm thinking of the web, right?

14:44 Like I want to get something posted on a form.

14:46 I want to get the, say, the email they've submitted.

14:49 I want to know that it's there, but I also got to make sure that it's not empty or it's not none.

14:52 Like if I'm already doing the if test, I don't want to do the conditional test and a try except.

14:58 You might as well just do one.

15:00 The only one that's going to work is the if, so just use get.

15:02 - The set default actually was something I didn't even know was there, which I learned something new.

15:07 I don't use that normally, but--

15:09 - What does that do?

15:10 - Set default will only set the value if the element does not exist yet.

15:16 - Yeah, that's perfect, yeah, it makes a lot of sense.

15:17 - So like, his example, and the thing is perfect, is if you're storing a counter or something, like a number of hours, and you just wanna increment, if you're trying to increment something, you wanna set it to zero to begin with, but you only want it to set it to zero if it isn't there already.

15:33 So that makes sense.

15:34 - Yeah, yeah, perfect.

15:35 So you don't have to do that test.

15:36 Then it also talks about using dictionaries as a switch statement, which I thought was a funny language hack.

15:41 I actually went and created a switch statement for the language in Python.

15:45 It's on GitHub.

15:46 And it's really nice.

15:48 I use it in some of like some really gnarly code that has got like 50 or 100 cases.

15:54 And it's just a lot nicer 'cause it'll do things like not let you have the same key twice, for example, things like that.

16:00 - So you do use it?

16:02 - Oh yeah, I use it, I love it.

16:03 It's like, I think it's great.

16:05 It uses a with block.

16:06 So it uses the with block as the switch block, basically.

16:10 And then you just have cases in there.

16:11 Anyway, it's kind of funky, but I'll put a link into it.

16:15 But I do think it's interesting that dictionaries can be used for switch statements.

16:19 - Yeah, I think it's good to comment because not everybody's gonna understand what's going on.

16:24 So make a comment about what your code's doing.

16:26 - Yeah, yeah, for sure.

16:27 All right, Max, what's this next one you got?

16:30 All right, short article I found, things you're probably not using in Python 3 but should.

16:35 This is from

16:38 So this is particularly relevant for me because I used Python legacy at Foursquare for many years.

16:42 Now I'm coming back to it, taking another look at v3 over the last couple of years.

16:47 So just a couple of things it has that stood out for me, one that looks very useful is fstrings, where you can put the variable name in braces in a string and just have it replaced.

16:57 So long as you remember to put the character F before the string, that's very important.

17:03 So, you know, I've seen things like this in other languages, Scala has it, PHP, most front end scripts have things like this, makes the code very readable, except I know myself, I know I'm gonna screw up by leaving out that straight F in front of the string, so I almost feel like it should be automatic, but it is very useful.

17:21 - Yeah, I feel the same way.

17:21 I'm always like, I'm halfway through writing a string and I'm like, oh, I should have put the F at the front.

17:26 Well, now I'm just gonna do a format on the end with my editor, I type dot and F and it auto completes format. So it's just, we're just gonna keep rolling. You know what I mean? Like it's one of these things that is really nice, but you got to be a little cognizant up front, right?

17:38 Yeah. If you're correct, it looks very good. And actually we did some things at Foursquare. We, and this was for Scala code where we had like a GitHub hooks that looked to see, Hey, this is a formatted string. And if you were trying to check in code, that was a formatted string, but you didn't actually put, I think in Scala, there was an S in front of it or something.

18:01 If you didn't actually format the string, it's like, okay, this is probably an error.

18:04 You probably shouldn't be checking this in.

18:05 Oh, interesting.

18:06 That's sort of a workaround.

18:07 Yeah, yeah, yeah.

18:08 It was helpful, but yeah, it'd be nice to have in the language, but just having the formatted strings is always helpful.

18:13 Another thing I didn't know that Python 3 had is enumerations.

18:17 You know, again, with the functional programming, I've been using enums for years.

18:22 They tend to make code way more readable, in my opinion.

18:25 And so that was good to know.

18:28 I'll keep that in mind when developing in Python 3.

18:30 Nice.

18:31 I love the discoverability that enums give you, right?

18:33 You can say enumy thing dot, and then there's the list of things.

18:36 You don't have to go research, like, well, what values can I pass for level?

18:40 Is it 1, 2, 3?

18:41 Is it a 0 to 1?

18:44 It's like low, medium, high.

18:45 Pick one.

18:46 Yeah.

18:47 Yeah.

18:48 And they're reusable.

18:49 You know i could look at any number and figure out oh i know what this you know i know what this code is doing without having to really read tons of comments are really worth enough i see your e-numbs i can know what you're doing i feel like that under underutilized in general.

19:04 Brian anything definitely underutilized by me i and it's one of those things that i've it's on my list to try to use more i don't use magic numbers too much but i.

19:14 We do have cases where it just uses string, but it really ought to be an enum instead of a set of possible strings.

19:23 For sure.

19:23 Cool. Well, I think one of the themes of the show today is that modern Python is definitely making its way past legacy Python, right? Python 3 is coming on strong.

19:34 And if you look at what the real challenge, I think there's a lot of things that made this move a little bit difficult.

19:42 But if you look at the heart of it, really the heart of what made the Python 2-3 migration challenging were strings, right?

19:50 So the fact that strings used to be the same as bytes and you could either treat it as like a byte list or actually an encoded string and you had to kind of know that was a problem.

20:00 But it was also an opportunity to have simpler code like request, for example, could talk to the network differently than it has to now because it doesn't have to like do the encoding and all these changes, right?

20:10 But it's important that we have emojis and support other languages that have umlauts and things like that.

20:16 So having a Unicode is really important.

20:18 But I do feel like if you look at all the stuff, like people say, oh, Python 3, I can't move to that.

20:23 That's so, it sounds like a, you know, like a huge problem, it's gonna be so hard.

20:28 But then when you look at the code, like how hard is it to write Python 2 code that's compatible with 3?

20:33 It's like not very different.

20:36 But one of the big differences is strings.

20:37 So what's interesting is that I wanna cover This comes from James Small.

20:42 He sent over an episode of the CPP Cast, which is a C++ podcast.

20:48 I think one of the bigger ones.

20:49 I don't really know all of them, but I definitely know of that one.

20:53 And Herb Sutter, who was instrumental in C++, he was interviewed there, and the interviewers asked, "If you could go back and change C++ types, "what changes would you make?" and so on.

21:07 And basically the answer was almost exactly what happened going from Python two to three.

21:12 - Yeah, that was interesting.

21:13 - Yeah, pretty interesting, right?

21:14 So if it was possible, the C++ guys very well may have done exactly what we did to go from Python two to three.

21:20 And it was like, we're gonna take strings and split them into Unicode characters and byte arrays and things like that.

21:26 And so, I don't know, I feel like if that's really the essence of what is holding back people switching from two to three, I don't know, it just doesn't seem like that's that big of a deal.

21:35 I know if you're writing requests or you're writing stuff that literally is a web server and you're talking on the network, okay, that's kind of a bigger deal.

21:43 But in general, it doesn't seem like it's that big of a deal.

21:45 Yeah, the big deal was that the Python, I think, from my perspective, that the Python strings used in two matched the idea of a character array in C.

21:58 And so all of the DLLs that some packages interacted with could just interact with it directly.

22:05 interacting with bytes, you're already doing something funky anyway. But now you have to split that up. And sometimes, you know what it's like, we're going to see sometimes you're using a character array, but it's really not characters, it's really bytes. And so when they were really strings, and when when they were just byte arrays, yeah, it's messy.

22:24 Yeah, yeah, it's definitely messy.

22:26 So I haven't used Python for the purpose of byte arrays before I did most of my, Python codes have been scripts.

22:35 I haven't used it for web services.

22:37 So is this something that's very common?

22:38 And I have used Cython.

22:41 So does that make use of strings as byte arrays, or am I overthinking this?

22:45 - I think in Cython they have their own types for these types of things.

22:50 I'm not 100% sure, but I think so.

22:51 Like you could have pointers in Cython and stuff like that.

22:54 In terms of, so you, basically now we have strings and we have lists, right?

23:00 But lists are not at all like byte arrays, right?

23:03 I can't pass it off to C as a contiguous block of memory of similar data, right?

23:08 But you can actually create--

23:09 - Sure.

23:09 - Arrays that are typed.

23:10 I can say I have arrays that hold bytes or arrays that hold integers and there's some--

23:15 - You can do that in Python, you know.

23:16 - I forget exactly what module you gotta use to do it, but there's some way to say, I have this homogeneous thing that I'm creating.

23:24 It's something I've extremely rarely have done, so I forgot the steps of it.

23:29 But yeah, there's some mechanism in there to do that.

23:32 Yeah, and you can prefix a string with the B character in it.

23:36 And then you can put byte codes inside of it for constants.

23:40 That doesn't sound so bad.

23:41 Although, the prefix strings, there's only 26 of them.

23:44 So we'll see.

23:45 We know there's an F and a B.

23:47 Oh, we could probably put an OXU114 as a prefix.

23:52 Yeah, so I don't know.

23:53 I guess when I was thinking about this, the idea is pretty straightforward.

23:57 but I'm just wondering, could the PSF, it just got me thinking about the whole transition from two to three, could the PSF been more proactive and strategical?

24:09 Like could the PSF said, hey, it's super important we make this change.

24:12 It looks like these seven libraries are the foundation of all the other libraries that are all stuck on Python 2 because none of these are changing.

24:21 Could we just raise $200,000, hire some people and just in three months, upgrade all these libraries and just be done with it?

24:28 How would the world look different if there was a quick and focused response to this challenge?

24:34 Right, 'cause I feel like the actual problem that most people hit was, the library I care about doesn't support Python 2.

24:41 That library actually, sorry, three, that library only supported Python 2, not because that's what it wanted, but because the library it was based on only supported 2.

24:49 It was like this sort of chain, and the lowest level pieces were getting everyone stuck.

24:54 So, I don't know, it's interesting.

24:56 There's so many corner cases that, like for instance, the hiccup for me was it was one library.

25:03 And it was because the DLL, that the library is a thin wrapper around a DLL.

25:11 And that DLL interaction was all this, the different ways--

25:15 - It's a character pointer type thing, yeah.

25:17 - Yeah, but it's on top of that, one of the hiccups wasn't just because of this.

25:21 It was also because the way that Python libraries interact with DLLs, that changed completely also from two to three.

25:30 Yeah.

25:31 Okay.

25:32 Yeah, the C extensions and stuff like that.

25:33 Yeah.

25:34 So the library that I needed was, that was just some complicated beast that a university in Germany finally had some people that converted it to Python 3.

25:44 So well done.

25:45 Well done, academia.

25:46 Well done.

25:47 Nice.

25:48 All right.

25:49 Well, that's our main topics today.

25:51 I wanna just throw out, see if you all have a couple of extras, real quick things to touch on.

25:56 I do wanna bring up this thing that Devo Kaplan sent over.

26:00 He was listening to one of our episodes.

26:02 I don't remember what we were even talking about, but it was something crazy about what happens when you pip install a thing, maybe running some code as part of the setup UI and so on.

26:11 And so he said, all right, well, let me see if I can create something that's kind of funny and amusing based on what we've been talking about.

26:19 So he created a package called mystery.

26:21 Okay, so this sounds like a Russian roulette type situation. Yes, it does to me too So if you pip install a mystery it will then go and like randomly pick Something else out of pipe out of the package index and then install that so you never know what you get you can just pip It's gonna be it's gonna be a mystery. I don't actually recommend using this in production by the way Well, it'd be fun to give a try. It could be you could be installing numpy or numpy We had we've I've always thought about which one to describe or it could be something that Totally changes the language or something that takes 10 hours to install you never know Maybe do it in a virtual machine that you can erase later. Yeah also, I just want to give a shout out to the book that I released the effective pi charm book and Point out that if people are interested in the pi charm course and or the pi charm book if you go to effective pi charm comm I work Matt Harrison and I are running a bundle deal so you can get the course and the book discounted together.

27:20 So check that out.

27:21 And people, if they've already bought the course or they bought the bundle, shoot me a note and I'll give you the discount towards as, 'cause you maybe bought it before this existed.

27:28 So check that out. - That's awesome.

27:30 - Yeah, thanks.

27:31 Brian, how about you?

27:32 What you got?

27:33 - Just really quickly, the Python 3.8.0 Beta 1 is out.

27:38 So if you're a package supporter, please go test your package and make sure that, That sounded weird, but go test your code to make sure that it works with Python 3.8.

27:48 - That's super new.

27:49 So this is beta one, right?

27:50 This is a big deal.

27:51 It's like the first feature freeze.

27:53 - Yeah. - Yeah, cool.

27:54 Max, how about you?

27:56 - All right, well, thanks for letting me talk about my own podcast, which is called The Local Maximum.

28:01 - Of course, it's a good one.

28:02 I've listened to it.

28:03 It's high quality.

28:04 I definitely like it.

28:05 Tell people about it.

28:06 - Yeah, very cool.

28:07 Well, it's a weekly tech podcast.

28:08 And so I cover both the theoretical issues in probability theory, philosophy, and machine learning, but then I kind of apply it in a practical way to things like current events and product development and interviews.

28:20 And I do some like opinion piece type stuff as I did this week.

28:24 So for example, a few weeks ago, my co-host asked a question, how do you estimate the probability of an event that has never occurred?

28:32 And so we dove into that question and I started with, well, every event has never occurred, but what are you really asking me here?

28:39 And some of the news that we've dived into recently is Apple's decision to break up iTunes, what that means in terms of product development, how the internet is shaping up in places like Cuba.

28:51 I find that stuff really interesting and the controversy around YouTube's recommendation algorithm.

28:57 I also talk a lot about data science careers and I interview people like Hillary Mason here in New York and Mark Sanodella, who's the CEO of the latter's.

29:05 He critiqued my resume on my podcast.

29:08 That was very fun.

29:09 That's a little stressful, huh?

29:10 Yeah, he had me rewrite my resume.

29:13 So yeah, there's probably something for everybody.

29:17 It's the type of thing.

29:19 I don't know if it's--

29:21 I don't know if there's anyone who's into it every single week or if most people kind of skip around.

29:27 But either way, it's cool with me.

29:29 Yeah, it's cool.

29:29 I like that it's technical, but not deeply technical.

29:34 You can kind of make it casual listening, too.

29:36 Yeah, yeah.

29:36 Nice.

29:37 All right.

29:37 Well, I have a quick joke for you guys, and then Brian has an idea for something completely different.

29:44 So, you know, Brian, they say there's only two hard problems in computer science, right?

29:47 Yeah, tell me what they are.

29:49 It's cache invalidation, naming things, and off by one errors.

29:52 I love that joke.

29:54 Yeah, it's a good one.

29:55 All right, so I think you need to give a short explanation.

29:59 There's also off by two errors.

30:01 That's right.

30:02 I think you need to give an explanation for what is about to come, because it actually is something completely different. Why are we going to do what we're about to do?

30:09 Okay, so the Python 3.8.0 Beta 1 release notes, I was skimming down this and there's some pretty exciting stuff there. So I'm going to, I'm excited to try it out. But at the bottom, it says, and now for something completely different. And then it has like a skit from, it sounds, it looks like a little snippet of an interview from some of the Monty Python people.

30:32 - Yeah, and I suspect most people know, but for those of you who don't, Python has nothing to do with a snake in its naming.

30:39 It comes from Monty Python.

30:41 That's what Guido got the inspiration from, right?

30:43 - Yeah, even though all the logos are snakes, nobody knows why. - Yes, I know.

30:46 - They should be cheese or something, I don't know.

30:48 - We should change our logos to like, cheese and maybe a knight with no legs.

30:51 - Yeah, yeah, rabbit, killer rabbit.

30:53 - Yeah, oh. (laughs)

30:55 Get the holy hand grenade out there.

30:57 All right, so now for something completely different.

30:59 - Yeah, I thought we could read this skit out.

31:01 So are you guys ready?

31:03 - Let's do it.

31:04 - I'll try to do it with feeling, but I'm not very good with accents.

31:06 So we'll see what happens.

31:09 - Okay.

31:10 - This is entirely in rehearsal.

31:11 Let's do it.

31:11 - Okay.

31:12 - So who'd have thought 30 years ago that we'd all be sitting here drinking Chateau de Chassolet wine?

31:17 - Aye, in them days, we'd be glad to have the price of a cup of tea.

31:21 - A cup of cold tea.

31:23 - With milk, without milk or sugar.

31:25 - Or tea.

31:26 - In a filthy crack cup.

31:27 - We never used to have a cup.

31:29 We used to drink tea out of a rolled up newspaper.

31:31 The best we could manage was to suck on a piece of damp cloth.

31:35 But you try and tell the young people today that, hey, won't believe you.

31:39 No.

31:39 Nope.

31:40 Nope.

31:40 Not at all.

31:43 All right, folks.

31:44 That was literally at the end of the official release notes for Python 3.8.

31:47 So pretty cool.

31:48 Good read through, people.

31:50 All right, Max, thank you for joining us, Brian and me, on the show today.

31:53 It was fun to have you as a guest.

31:54 Thank you so much for having me.

31:55 Thanks.

31:56 This was a lot of fun.

31:57 Brian, thanks as always.

31:58 See you later.

31:59 Thank you.

31:59 Bye.

32:00 Thank you for listening to Python Bytes.

32:01 Follow the show on Twitter via @PythonBytes.

32:04 That's Python Bytes as in B-Y-T-E-S.

32:07 And get the full show notes at

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

32:14 We're always on the lookout for sharing something cool.

32:17 On behalf of myself and Brian Auchin, this is Michael Kennedy.

32:20 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page