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


Transcript #114: What should be in the Python standard library?

Return to episode page view on github
Recorded on Thursday, Jan 24, 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 114, recorded January 23rd, 2019. I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And this episode is brought to you by DigitalOcean. Check them out at pythonbytes.fm.

00:16 Brian, how are you doing?

00:18 I am doing good.

00:19 That's great to hear. I am as well.

00:21 And I hear often people praise Python because it is a batteries included language or technology.

00:29 And I think that's really important, but it's not a subtle debate, is it?

00:33 No, this was interesting.

00:35 We actually, there's an article we're going to link to called What Should Be in the Python Standard Library.

00:41 So with the batteries included, we often think of that as, well, I don't know.

00:45 I used to think of it as the standard library.

00:47 Now I kind of think of it as the standard library plus some of the recommended PyPI packages and stuff.

00:54 Exactly. Like there's, it's almost like an onion.

00:56 You have the language, you have the standard library, and you have pip install, anti-gravity, like wrapping around it.

01:02 And I agree when I think of batteries included, I think of it as like that whole spectrum.

01:05 Then there's even stuff that you couldn't, can't easily install even through PyPI.

01:10 Things like that are in distributions, like the scientific packages and stuff.

01:14 Yep, indeed.

01:15 We were going to talk about it last week, but I couldn't find an article that didn't say stuff like, this is internal.

01:20 But now I found an article on lwn.net, and I just can, I'm probably not the first one to say that this is a really ugly website.

01:29 This is technically true.

01:31 It could certainly use a little bootstrap action theme or something.

01:35 But it's by Jake Edge, and Jake Edge does a lot of good coverage of the core developer meeting.

01:41 So well done, Jake.

01:42 No, yeah, definitely great information.

01:44 This will be hard to summarize.

01:46 But anyway, we've got somebody, I think Jonathan Underwood proposed adding LZ4 compression to the standard library.

01:55 Because there's already some other compression.

01:57 Right.

01:58 You can do zip files and tar files.

02:00 Why not LZ4 or RAR or some random other type of compression?

02:05 Right.

02:05 So, and then Brett Cannon proposed making something similar to hashlib.

02:10 If there's a whole bunch of other kinds of compression algorithms, maybe we could have like a compresslib or something.

02:16 That had a bunch of different algorithms in it.

02:18 Then Can of Worms opens.

02:20 So there's an argument against it.

02:23 Basically, we don't actually, standard lib doesn't need LZ4.

02:28 Maybe people do, but standard lib doesn't.

02:31 It already has BZ2 there, which I'm not sure what BZ2 is.

02:35 I think it's a zip thing.

02:36 But it's kind of late to remove it since people rely on it.

02:40 And then kind of a discussion ensued, like if standard lib is the batteries included, shouldn't we have some way to add new batteries?

02:49 Even things that aren't needed by standard library, but other people might need.

02:54 And then there's a discussion as well of you can't just rely on PyPI because some people don't have easy access to it or can't install things.

03:02 Right.

03:03 Maybe it's like REPL, some kind of online REPL, and you can type whatever they've installed, but that's it.

03:08 That's true.

03:09 There's online REPL stuff.

03:10 Then there's also things like people working behind a firewall that have to have proxies to get out and use PyPI, and you have to apply for a proxy password and stuff like that.

03:23 So there's issues.

03:24 And then it gets bigger as to like, well, if we're not going to add a whole bunch of other stuff, maybe we should look at the stuff we already have and maybe kick some of it out.

03:33 Who would decide what gets kicked out?

03:35 And, you know, it falls along with a discussion of, well, maybe we don't really think of it as just the standard library as our batteries included, but maybe we could have a standard distribution that had like some set of recommended PyPI packages.

03:51 Right.

03:51 Because the initial discussion was, can we make standard lib bigger?

03:55 And some of the responses were, actually, can we make it smaller?

03:59 Can we have less stuff, not more?

04:01 Which I thought was pretty interesting.

04:04 Which has led to, let's make it a lot smaller, but let's make much of what is standard lib, like a standard distribution, like anaconda versus miniconda type of thing.

04:14 Right.

04:15 With more or less, but you can choose that sort of thing, right?

04:18 Yep.

04:18 There really isn't a solution here.

04:20 It's just an interesting discussion going on, so I thought I'd bring it up.

04:23 Anything that would happen would end up happening through PEPs, and the PEP process is sort of stalled right now.

04:31 So we've got to figure out that first.

04:33 Yeah.

04:33 It's interesting.

04:34 I certainly see some of the drawbacks, right?

04:37 Like one of the complaints or one of the cautionary flags that was raised when they said, oh, could we add this?

04:43 It was like, you're trying to give us more puppies.

04:45 We have a kennel full of puppies, and we're really busy taking care of them.

04:48 Like, you're trying to give us more of these modules that we have to care for indefinitely, right?

04:54 It's almost impossible to take something out of the standard lib.

04:56 So maybe we shouldn't do that so much because releasing the next version of Python means all the standard lib modules are up to date, got all their patches, and any additional features.

05:08 It was just a bigger software project to corral.

05:12 And so Steve Dower suggested maybe like a smaller standard library that has a standard distribution that comes with the stuff that kind of got pushed out or something to that effect.

05:20 And maybe those comes with even more batteries, like a bunch of PyPI modules curated by core developers.

05:27 And I thought that's a pretty cool idea.

05:28 Like, you have a mini Python, and then you've got, oh, and it comes with requests, and it comes with, I don't know, pandas or like whatever, you name it, right?

05:36 It comes with some web framework included, I don't know, right?

05:41 But it's a cool idea.

05:41 And then you could update it independently.

05:43 One of the interesting arguments for taking things out is that there are things that are in the standard library that once you get into Python a little bit, you realize that's not the right way to do it.

05:56 The standard way to do certain things is to use, like, requests, and requests isn't in there.

06:03 Yeah, almost nobody uses the built-in ACP library unless they are explicitly trying to go without dependencies.

06:09 Yeah, and there are people that try to do things just without dependencies.

06:13 And, yeah, it's an interesting thing.

06:15 Like, for instance, unit test.

06:17 One of the reasons why a lot of people recommend or say they'd rather use unit test over pytest is because unit test is in the standard library and pytest is not.

06:28 And why is the unit test in the standard library?

06:31 Because the standard library needs something to test itself with.

06:33 Right.

06:34 And that predates everything.

06:35 I mean, it's very, like, JUnit-esque, right?

06:38 It's got some old school style to it.

06:41 But, you know, that's the way it was.

06:43 It can't come out.

06:44 Like, for instance, if we had the standard distribution, we could possibly put, like, unit test out and into the standard distribution.

06:51 Right.

06:52 And then pytest could be one of those curated modules that comes with the distribution, right?

06:56 And those are just a couple examples.

06:57 I kind of like this idea of a standard distribution thing.

07:00 I do, too.

07:00 I mean, because if there's an improvement to one of the modules there, you can pip install upgrade it, whereas you've got to wait 18 months for it to come out with part of CPython.

07:10 Yeah, and another thing is if we make the standard distribution smaller, it makes the process for releasing new versions of Python a little easier because there's less stuff to test.

07:21 Yeah, I'm not sure if this is a good idea or not.

07:23 My first impression is I see a lot of benefits to it.

07:26 I can certainly see some drawbacks, right?

07:27 Like, oh, you got the wrong distribution.

07:29 Not only did you have to have Python 3.6 and not 3.5, but you also need to have the super-duper core.

07:34 Yeah, that's true.

07:35 But at the same time, there's a lot of benefits to it, right?

07:38 Like, the standard Python experience could get better if it came with a bunch of awesome curated PyPI packages.

07:45 Yeah, so I'll just leave this as everybody involved with this, I'd like to have people just remember to listen to each other and not talk past each other, talk at each other and listen.

07:55 Yeah, yeah, yeah.

07:55 And finally, I guess maybe just a data point.

07:58 If people look at what Microsoft did with .NET, they had a huge, huge distribution and base class library, and they decided that this doesn't make sense to maintain all the stuff.

08:08 If we're going to have a cross-platform .NET, which they created.

08:11 So they made a lot of the .NET standard library or base class library basically pip installable, right?

08:18 Like, you get this core thing, and then you install the little other bits.

08:20 So it's not that different than what Steve is proposing.

08:23 How is that received by the .NET community?

08:26 I think it's mixed, honestly.

08:27 Like, it makes life a little bit more hard, right?

08:30 Because you can't just use the stuff.

08:31 You're like, oh, you've got to have these dependencies and install it.

08:33 But it did make it possible for them to have a Linux and macOS version that they can now use when before it was stuck in Windows.

08:40 So they're like, this part only belongs in Windows.

08:43 It can't go somewhere else.

08:44 So now it's going to be part of this external thing that you can only get by installing that dependency on Windows.

08:49 So I don't know, there's some benefits, but also, you know, packaging is already challenging in Python, so I'm not sure I want to poke the bear.

08:55 Yeah, okay.

08:56 But it's pretty cool.

08:57 Speaking of pretty cool, something I've wanted to install but I don't have enough devices to justify is this thing called Home Assistant.

09:05 Do you know this?

09:06 Well, we've talked about it a couple times, but I haven't tried it yet.

09:09 Yeah, neither have I because I think I might have one smart light bulb I bought on accident.

09:13 I technically have a Nest.

09:18 My car is electric, so it has a charger, but the charger doesn't integrate with Home Assistant, so that doesn't help me.

09:23 So I would really love to have it, but I just don't have enough.

09:26 My home is too old school and too analog for it.

09:29 Anyway, Home Assistant is this cool web server that integrates all your smart home appliances and things and collects data about them.

09:36 It can run as a web server on a Raspberry Pi, and you just leave that in your house, and it does magic, which is cool.

09:42 Very cool.

09:43 So Paul Cutler, one of our listeners, let us know that they have now launched a data science portal to process and work with your data that comes from your home backed by Home Assistant.

09:53 That's pretty cool, right?

09:53 Oh, yeah.

09:54 Nice.

09:55 You can have like temperature sensors and stuff.

09:56 Yeah, exactly.

09:57 And it's already collecting all that data on just because what Home Assistant is, but now they've set up a special way to work with it.

10:04 So they said, look, one of the core ideas of Home Assistant is all of your data lives on your Raspberry Pi on an SD card, not somewhere else.

10:12 So they set up this Home Assistant data science website to help you work with that data and analyze it.

10:18 And then they went so far to create a new add-on for their IO that runs home, their OS that runs Home Assistant called JupyterLab Lite.

10:26 This runs JupyterLab, right on your Raspberry Pi hosting Home Assistant.

10:31 So on the same thing that is your Home Assistant, now you have a JupyterLab running there to analyze your data in place.

10:37 Oh, cool.

10:37 Yeah, and they also created a Python library called the HASS, that's their operating system, Data Detective, that's based on things like Pandas.

10:45 It lets you like start get going quick.

10:48 So anyway, it's pretty cool.

10:49 Yeah, very nice.

10:50 So if people have a smart home and they want to do some data science-y stuff about it or maybe even build a product for other people so that they have like more data control over their home.

10:59 Yeah.

11:00 Yeah, so that's pretty cool.

11:01 And then finally, I think I finally decided my first IoT project.

11:06 We'll see if I can actually make it happen.

11:07 But I've always wanted to build an IoT thing and I'm always like, but I don't really have any useful one.

11:11 But I think I have a useful one now.

11:13 Oh, tell me about it.

11:13 Yeah.

11:14 So you might sympathize with this.

11:15 I know a lot of people who do things like we do would.

11:18 So I have a separate office of my garage where I can record quietly away from the kids.

11:26 But especially in the summer, kids are home.

11:27 They come over.

11:28 They want to talk to me or my wife's like, hey, I got to ask you something.

11:31 And I might be in the middle of recording a course or talking to you, right, recording a podcast.

11:35 So I'm going to get a big fat button and I can press the button recording, not recording.

11:41 And then down by the door before people even get to here, it's going to say recording, not recording.

11:45 Oh, that'd be cool.

11:46 Wouldn't that be fun?

11:47 It's super easy.

11:47 Yeah.

11:48 What if you could hook it up to the Skype connection status?

11:50 Oh, yeah.

11:51 Maybe so.

11:52 Do you have Camtasia running?

11:54 Are you on a Skype call?

11:55 Yeah.

11:56 Oh, if it could be automatic, that'd be sweet.

11:57 Yeah.

11:58 Why not?

11:58 Right.

11:58 Zoom.

11:59 A couple of those things.

12:00 Yeah.

12:00 Yeah.

12:00 All right, though.

12:01 There we go.

12:01 It just went up a notch.

12:02 Pretty cool.

12:04 It started easy.

12:06 Now it's hard.

12:07 Now all of a sudden I have like a machine learning problem.

12:09 No, just kidding.

12:10 A bunch of APIs I got to learn.

12:11 That's cool.

12:12 All right.

12:13 Speaking of machine learning in the future, what do you got next?

12:16 Kevin Markham over at Dataschool.io.

12:19 I don't know if we've talked about him before, but Dataschool.io is pretty cool.

12:23 Yeah.

12:24 Kevin's doing cool stuff.

12:24 This isn't that for him.

12:25 Yeah.

12:25 It's just he's got a lot of cool resources.

12:28 But he wrote an article called What is the Future of the Pandas Library?

12:31 And I didn't realize Pandas is one of those zero-ver projects, which is odd considering

12:38 everybody uses it.

12:39 Yeah.

12:39 But they're considering going to a 1.0 release early this year.

12:43 And there's an article describing some of the stuff that is coming new and coming with some

12:49 of the new versions of Pandas.

12:50 One of the things is we already know method chaining is becoming more popular with functional

12:56 programming and people used to that.

12:57 But you can already do that with a lot of stuff in Pandas.

13:00 What's new really is just that they're going to try to take that further and make more methods

13:05 that support chaining.

13:07 All you have to do to support chaining is to return the object that you're operating on

13:12 as a return for a function call so that you can chain a bunch of function calls.

13:15 And a lot of times they probably return nothing.

13:17 So they might as well just return the thing again so you can have this fluent API, which

13:21 would be nice, right?

13:22 Yeah.

13:22 There's also people in the know might know what Apache Arrow is.

13:26 I really don't know what Apache Arrow is.

13:28 But apparently it's something that can help the back end of Pandas become a little bit more

13:33 efficient.

13:33 And so they're going to try to push that out.

13:35 It'll probably be after 1.0 because it doesn't change the interface at all.

13:39 Yeah, it's cool.

13:40 I don't know much about Apache Arrow, but it sounds cool.

13:42 They talk about things like working with data that's larger than what you can fit into memory

13:47 and things like that.

13:48 So instead of loading everything just into kind of data frame or something, it's like

13:52 it'll stream the data off disk and all sorts of stuff.

13:55 It's pretty cool.

13:55 Yep.

13:56 And I know a lot of people listening to this use Pandas every day.

13:59 I'm starting to use it more.

14:01 So the rest of my spiel will be stuff that I don't really know about, but you might.

14:06 One of the things is apparently it's hard to do custom data types because of some of the

14:11 limitations.

14:11 So you kind of have to jump through hoops.

14:14 But there is going to be extension arrays that make it easier to create custom data types

14:19 for using with Pandas, which that sounds neat.

14:22 And then some things that are going away.

14:24 So some deprecations that have been proposed in place parameter.

14:27 It doesn't really work as it's supposed to, and it mucks up chaining.

14:31 So they're going to try to deprecate that.

14:32 The IX accessor, which is going away or it's deprecating, use loc or iloc instead.

14:40 The panel data structure, apparently you should use multi-index instead.

14:44 And the sparse data frame never really worked as it was supposed to.

14:48 So they're going to just support data frame.

14:50 And last but not least, in the 1.0 release, they will stop support for 2.7.

14:56 Woohoo!

14:57 Viva modern Python, right?

15:00 Yeah.

15:00 That's right.

15:01 Living on.

15:02 So no more legacy Python.

15:03 Super.

15:04 Okay.

15:05 I think these things are all great.

15:06 I don't use Pandas enough to really say a whole lot, but I do think, you know, they talk,

15:10 Kevin talks a little bit about, like, the zero-over impression of it not being ready and so on.

15:16 And it feels like these deprecations are kind of like, all right, these are a few of the rough edges of the API

15:21 that we wish we could get rid of, and we're going to call it 1.0, and we're going to drop the few things that we don't really like, including Python 2.

15:28 Yeah.

15:29 Yeah, pretty sweet.

15:29 All right.

15:30 Also, sweet is DigitalOcean.

15:32 So if you want to do anything with containers, you've got to orchestrate them.

15:36 You've got to get them to talk together.

15:37 So check out Kubernetes.

15:39 And DigitalOcean just launched their public Kubernetes service, DOK8.

15:44 Super simple, managed Kubernetes service.

15:47 So you can deploy faster.

15:48 You can configure your Kubernetes cluster in seconds and provision and access your cluster in a few minutes.

15:55 You can scale reliably based on incoming traffic and everything stored in block storage and behind load balancers, stuff like that.

16:01 And people are seeing a 2.4 times better price-to-performance ratio compared to other providers.

16:08 So if you want to do all that cool stuff or more with a free $100 credit for new users,

16:13 check them out at pythonbytes.fm/DigitalOcean.

16:15 Now, I'd love to talk about something that we haven't.

16:19 I don't think we've touched on it very much, but maybe packaging up Python apps.

16:22 Have we talked about that?

16:23 Yes, we have.

16:25 I do remember that now, that three-week stint.

16:27 And we will more.

16:27 We will more.

16:29 This one is, at least it promises to be pretty excellent.

16:33 So let us count the ways there's more than this.

16:36 We have pecs, which is a way to make a zip file of Python code executable with its dependencies.

16:42 We have pyinstaller, which will take a Python environment plus its dependencies and turn it into kind of an embedded Python interpreter plus like a zip file or something to that effect of its dependencies and its source files.

16:59 And then run that as an exe.

17:04 There's pyto.com.

17:04 There's pyto.com.

17:04 There's cxfreeze.

17:05 There's many of these, right?

17:06 Yes.

17:06 The new kid on the block is pyoxidizer.

17:10 Okay.

17:10 So when you take the py element and you combine it with iron and oxygen through the Rust compiler, you get the pyoxidizer outcome.

17:19 Now, so pyoxidizer is a set of rust crates, libraries, I'm guessing.

17:24 Maybe the way to put it.

17:26 That facilitate building libraries and binaries containing Python interpreters.

17:30 Interesting.

17:31 So cxfreeze, pyinstaller.

17:34 You're like, okay, great.

17:35 Well, somebody loves Rust and they're just like doing it again, but this time with Rust because it's amazing.

17:39 But this one has some special capabilities that maybe are better.

17:43 So it makes a single executable file, an exe or .app or something.

17:46 And all the dependencies and all the resources like pyc files are embedded inside the executable.

17:54 So like with pyinstaller, you get an exe and then a bunch of loose files and like zip files and directories.

18:00 And somehow all that stuff gets like put back together to run.

18:02 Here you get a single exe or executable that takes those and puts them inside the binary as a resource and then runs it.

18:10 That's cool.

18:11 That's cool, right?

18:11 Yeah.

18:11 So it says, of course, the oxidizer part comes from a Rust.

18:14 And these are compiled from Rust.

18:18 And basically the Rust, it becomes like a Rust executable, right?

18:22 And the Rust executable code is responsible for managing and running the embedded Python interpreter in all of its operations.

18:30 So it's like totally self-contained.

18:31 Okay.

18:32 That's kind of cool.

18:33 It's pretty cool, right?

18:34 So it says it's like all these others that I mentioned, except for the produced executables contain embedded statically linked Python interpreters.

18:41 So no dependencies.

18:42 They have very little runtime dependencies on like the OS it runs on.

18:46 And everything is run from memory rather than extracting temporary Python files to a directory and trying to run them from there with weird pass and stuff.

18:54 Yeah.

18:54 So I'm pretty excited about this.

18:55 I haven't got a chance to try it, but I want to.

18:57 Yeah, me too.

18:58 Yeah.

18:58 It looks really promising.

18:59 It looks like this is the way it probably should be.

19:02 So I'm pretty excited if it works the way they're promising.

19:05 And you have to work with no files on the operating system.

19:07 You get one file, so it's simple.

19:09 But not all file systems are simple, right?

19:11 Right.

19:12 And actually, I love it when I can work on a project where I don't have to deal with the file system at all because sometimes it's just kind of a pain.

19:20 But anybody that's using tools can go, hey, I want to automate some part of my job.

19:27 And often that involves dealing with the file system.

19:30 Yeah.

19:30 And RealPython just recently put out an article called Working with Files in Python.

19:37 And at first, I'm like, oh, cool, another file system thing.

19:41 But it's a pretty nice article.

19:43 It's a very comprehensive write-up.

19:45 And they cover both legacy ways, like the OS and Sys versions, to do some of these things that I'll cover in just a second.

19:54 But they also use Pathlib.

19:56 I'm trying to use Pathlib more and more.

19:57 But Pathlib is for more recent versions of Python.

20:01 And you might not be there.

20:03 However, it might be that you're used to doing, you've done file system stuff in the past, and you want to try Pathlib also.

20:09 So having the examples right next to each other is kind of nice to be able to say, hey, I used to do this in OS, and now I'm going to use the Pathlib version here.

20:18 So that's cool.

20:19 Yeah.

20:19 Yeah, quite cool.

20:20 I'm not going to read the article, but a lot of the stuff you might have to do is get a directory listing, what all is in a directory, looking at file attributes, creating directories, doing pattern matching on file names, traversing directories, and doing stuff with the files that are there, creating temporary directories and files, deleting, copying, moving, renaming.

20:41 They include in this article how to deal with zip and tar files, including reading the contents of those.

20:46 So there's quite a bit of stuff here.

20:48 Yeah, it's really a really nice and standard comprehensive real Python article.

20:52 So well done on that.

20:54 One of the things that I like about this is it doesn't go, here's a way to read zip files.

21:00 Here's a way to create directories.

21:01 It goes, here are the ways, all the ways in the standard library to do this, and when you would choose this over that, and why that's better, and so on.

21:10 So for example, like with Path from Pathlib, you can say, I want to create the directories, but normally there'd be an exception if it already exists.

21:18 You can say, it's okay if it exists.

21:19 I just need it to be there.

21:20 Like, this is an idempotent type of thing I'm trying to do.

21:24 Stuff like that, right?

21:25 Or if I want to create multiple directories in a chain, like how do I create the intermediate ones without loops and other annoying checks?

21:33 So yeah, pretty nice.

21:34 Yeah, it's good to have all that stuff in one place, too.

21:36 Yeah, it's definitely a good reference thing, right?

21:38 Like, you probably don't need, if you've got to do all the things listed here at once, I don't know what you're doing.

21:44 You've got something going on that's a little crazy.

21:46 Like, I've got to zip and tar stuff and create directors and get the file attributes, right?

21:51 But it's certainly good to, like, have as a reference for when you've got to do one of them.

21:56 Yeah, but you usually have to do, like, one or, like, two of these things.

21:59 You might have to, like, create multiple directories and then read the file in there or something.

22:04 Yeah, for sure.

22:05 All right, so this last one that I picked first, Brian, this is a little bit motivated by a conversation we had before, right?

22:11 We had talked about having Python, the command you type on a terminal or a command prompt, being converted from meaning Python 2 to meaning Python 3.

22:21 That's part of this whole transition, right?

22:22 Yes.

22:23 I think what Red Hat was doing was basically saying there shall be no Python.

22:26 You have to type Python 2 or type Python 3 on, like, the new Red Hat Enterprise Linux.

22:31 And there was some debate about that.

22:33 So David Furfees sent a really cool thread from PEP394.

22:40 And it says, look, this thing that you sensibly suggested or at least debated on the show recently, it's been tried and it didn't go super well.

22:49 So Homebrew tried it.

22:50 Homebrew said, you know what?

22:51 Python equals Python 3.

22:53 Yes.

22:53 And there was a bunch of knock-on effects.

22:55 And they said, we're really sorry.

22:57 We kind of broke some stuff.

22:58 We'll put it back.

22:59 So Homebrew tried it and they had to actually roll it back.

23:02 And there's a link to that conversation.

23:04 Also, on the PEP394, there's some interesting conversation over on GitHub.

23:11 So this PEP394 is allow the Python command not to be installed, basically, other minor changes.

23:19 So basically requiring you to type Python 2 or to type Python 3.

23:23 So there is no way to just type Python, which to me doesn't feel like a great fix.

23:27 Like we want to move to the next version of Python.

23:30 So when Python 4 comes out, it's going to be like, well, everyone's using Python 3 in their tutorials.

23:35 And they keep breaking.

23:36 It doesn't seem very scalable.

23:39 But nonetheless, that's what the thing says.

23:41 So I want to read you a couple of thoughts that Gita Van Rossum had about this.

23:46 OK.

23:46 So somebody said, Python doesn't exist as a command on macOS.

23:51 So it's solved.

23:52 And so he's like, no, no, no.

23:54 Python 2 doesn't exist as a built-in command.

23:56 But Python definitely does.

23:59 So however, I'm still unhappy with basically people are saying, like, if you type Python and that means Python 2, what that is saying is the core developers prefer Python 2 over Python 3.

24:11 Because if you type the simplest statement to run Python, it does old Python, not new Python.

24:16 So there's an endorsement to say, let's not encourage Python 2, legacy Python.

24:22 Let's have Python point to Python 3, as we've been saying.

24:24 So Gita said, I'm still unhappy with any kind of endorsement of Python pointing at Python 3.

24:29 When the user gets bitten by this, they're going to be really unhappy.

24:33 Regardless of what macOS does, I think I would be happier in the future if Python as a command does not exist.

24:39 And you have to say Python 2 or Python 3.

24:42 Right.

24:42 So anyway, that's just a bit of a follow up to this Python equals Python 3 discussion we had.

24:49 Hmm.

24:49 Yeah.

24:50 Yeah.

24:50 I'm not super happy with it because I feel like, well, what happens when the next version of Python comes out?

24:55 Then it just gets complicated in the same way.

24:58 But still, it's okay.

24:59 I think that's our children's problem.

25:00 That's right.

25:02 It's like global warming.

25:03 That's someone else's problem.

25:04 We're just going to kick that down the road.

25:05 Let them deal with what happens when you type Python and it goes to Python 3, not 4.

25:10 Well, and how many other tools have, like, which grep do you want?

25:14 Do you want a grep 2 or a grep 4?

25:16 I mean.

25:17 Exactly.

25:17 You want to run Homebrew?

25:19 There are seven choices.

25:20 Which version of Homebrew you have installed do you want to run?

25:22 Like, no, I just want to run Homebrew.

25:24 Preferably the latest.

25:25 Yeah.

25:26 Anyway.

25:27 Yeah.

25:27 Anyway.

25:28 I guess that summarizes our thoughts, doesn't it?

25:30 Yeah.

25:30 Cool.

25:31 Well, I do have one quick extra thing.

25:34 You got any?

25:34 No, not right now.

25:35 So I'll just throw this thing out here because it wouldn't be a show if we didn't mention Anthony Shaw somehow, right?

25:40 Yeah.

25:41 He's a good friend of the show.

25:43 That's right.

25:43 So he wrote a letter to the Python community in Africa, which is a pretty interesting summation of,

25:50 the state of the Python community throughout the different regions of Africa and really highlighting a lot of cool stuff that's happening over there.

25:57 Oh, that's cool.

25:57 Yeah.

25:58 So he says, look, if you look at what they're doing, there's actually a lot of stuff that the broader Python community can learn for what people are doing there.

26:05 And I'll let you all read the article.

26:07 It's really long.

26:08 And it's just, this is an extra, right?

26:10 Not a deep analysis or whatever.

26:12 But just to give you a sense, like the attendance in terms of gender of PyCon NA was 50% male and 50% female.

26:20 Like think of other tech conferences where that's the case.

26:23 Yeah.

26:23 I've never been to one.

26:24 Neither have I.

26:25 Neither have I.

26:26 It wouldn't be terrible, would it?

26:28 Like that looks like the population.

26:29 Hey, wouldn't it be cool if your tech community looked like the population in general?

26:34 Anyway, he covers a bunch of stuff like that.

26:35 And there's a lot of interesting things going on.

26:37 So I thought I'd give him a shot out there.

26:39 I know we've laughed a lot on the show, Brian, but I don't think we're done.

26:43 No, we're not.

26:44 This is what I was waiting for, actually.

26:45 No, it was all good content, but it was good.

26:48 So we have our joke.

26:49 Are you telling it or am I telling it?

26:51 You can tell it.

26:51 Okay.

26:51 So this comes to us from Luke Russell, who sent in a joke, which is great because it helps us to have jokes if people send them to us.

26:59 Yeah.

26:59 All right.

27:00 So this is a knock, knock joke.

27:02 You ready?

27:02 Yeah.

27:03 Knock, knock.

27:04 Who's there?

27:04 Java.

27:04 Takes a while to get started.

27:06 Hold on.

27:07 We're good now.

27:07 We're running.

27:08 I love that.

27:11 I told this a couple of times at work and instead of like the pause, I counted on my fingers.

27:16 Well, as long as I can't see, it's fine.

27:20 So actually, this brought back memories of a really funny, doesn't directly involve Python, but it involves open source.

27:27 And if it were made in a later date, it probably would be involving Python, but instead it involves Java.

27:33 It's a video, which is really funny.

27:34 Yeah.

27:35 It's called Java forever.

27:36 And this is an amazing video.

27:38 So people watch this.

27:40 It's like high production value.

27:41 I hadn't seen this before.

27:43 And it's really, really hilarious.

27:45 Yeah.

27:45 So there's this family.

27:47 They love .NET, Microsoft, and they will never stray from them like a very authoritative father.

27:52 But there's a rebellious 18-year-old who loves open source and Java and all sorts of crazy mayhem ensues.

27:59 And we can't do it justice here.

28:01 So I'll just link to the YouTube.

28:02 It's pretty funny.

28:03 Check it out.

28:03 Yeah.

28:04 All right.

28:05 All right.

28:05 Thanks for the joke, Brian.

28:07 Thank you.

28:07 Yeah.

28:08 Catch you later.

28:08 Bye.

28:08 Thank you for listening to Python Bytes.

28:10 Follow the show on Twitter via at Python Bytes.

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

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

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

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

28:26 On behalf of myself and Brian Okken, this is Michael Kennedy.

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

Back to show page