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


Transcript #267: Python on the beach

Return to episode page view on github
Recorded on Wednesday, Jan 19, 2022.

00:00 Hey there, thanks for listening. Before we jump into this episode, I just want to remind you

00:03 that this episode is brought to you by us over at Talk Python Training and Brian through his pytest

00:09 book. So if you want to get hands-on and learn something with Python, be sure to consider our

00:15 courses over at Talk Python Training. Visit them via pythonbytes.fm/courses. And if you're

00:22 looking to do testing and get better with pytest, check out Brian's book at pythonbytes.fm slash

00:27 pytest. Enjoy the episode. Hello and welcome to Python Bytes, where we deliver Python news and

00:33 headlines directly to your earbuds. This is episode 267, recorded January 19th, 2022. That's it. I'm

00:42 Brian Okken. I'm Michael Kennedy. I've got a cool green screen today. I know some days we have cool

00:49 stuff to talk about and cool things to share, but you're taking the next level. You are live streaming

00:55 and recording right from the beach in Hawaii. So yeah, I'm looking out at surfers right now. So

01:01 it's nice. It's, you could probably handle doing it more than one week, right? You could just do this

01:06 for a while. Yeah, we should, I should move here about a month every year. That'd be great. But anyway,

01:12 let's move on to our topics. Michael, you want to talk about boxes? I really do want to talk about

01:19 boxes. This is such a cool library that I found. So here's the thing. We have Python classes and we

01:26 have dictionaries. Where's all the data stored for most classes? In the dunder dict, right? Which is a

01:33 dictionary of what is your field? Here's its value. Each instance of the class, each object gets its own

01:39 instance of that dictionary, right? Yeah. And yet when we have a dictionary, we can't treat it,

01:45 we can't get the values of the dictionary in the same way that we do have a class, a class, you say

01:51 thing dot field. Well, wouldn't it be nice if you could go to your dictionary and say it has a key dot

01:56 name. So just D dot name to access it. That's the basic idea behind this thing called box by CD

02:04 Griffith. And that enough, that was enough to get me interested and think, all right, this is a cool

02:10 idea that I would love to play with and maybe I should use it more. But then I started to look a

02:16 little bit further. So if you go down here, it says, all right, well, sometimes these keys, they have a

02:23 structure that won't allow you to treat them that way, like a space or a colon in the example, spaces and

02:30 colon. Yeah. So for example, they have a key that is the name of a movie and then data about that

02:37 movie. So Robin hood spaces, colon men in tights with spaces. And by default, it'll actually convert

02:44 that into something that you can use by just, you know, replacing spaces with underscores and colons

02:50 just go away and stuff like that. Oh, that's awesome. You can still do that, which is cool. But there's a lot

02:55 more stuff. It says, check out the box GitHub wiki, which is right on the homepage, the GitHub that I

03:01 linked to. And there's all sorts of things. So they show, start by showing just the basic stuff, like

03:07 here's a box and you just, you can create it through keyword values or pass it a dictionary. It'll

03:12 initialize out of that. So they've got like funny movie equals something. And you just say

03:16 my box dot funny movie, just like it was a class. And that was like, I described the first thing.

03:21 However, there's more that you can do with it. So if you go over to the types of boxes,

03:26 they have conversion box, default boxes, box dots, camel killer box, which is awesome.

03:33 Frozen boxes, converters. So not just only will it work in all these ways, which I'm about to describe,

03:38 it will convert to and from dictionaries, to and from JSON, to and from YAML, to and from message pack

03:44 and CSV. Okay. So let's go to the types of boxes and check this out. So by default,

03:50 you get the conversion box, which is what I described where there's a space that'll put an underscore.

03:55 Yeah.

03:56 All of them you can access in this key value way. It's just a matter of what happens to the keys,

04:01 if there's a way to make them more accessible, but you can turn that off.

04:03 You can have, you know, a default dictionary, right? Where if the thing is not there, instead of

04:09 throwing a key or it'll create whatever you say the default is like create a list. Cause I want to add up

04:14 things or create, start with the number zero. Cause we're trying to count each one of those as we

04:18 build it up or something like that. Right? So it can also be a default dictionary. They call that a

04:23 default box, which is cool. And it can also do what it calls a box dots. So in a string, you can traverse

04:32 the hierarchy of the stuff contained in the box through the dot notation. So you could say, you know,

04:39 my box dot a dot B dot C, and it has this fluent interface where the thing that it returns from

04:44 each level is either a primitive thing, like a number, but if it's a sub dictionary, it'll return

04:50 a sub box, I guess. Right. So you can keep going on it. You can also then just say, quote, a dot B dot C

04:56 to traverse that hierarchy as a string. If that's more programmable, this one is great. Are you working

05:02 against an API or some data source that is written in a different language style? So especially I'm

05:09 thinking C# here where it's not lowercase and underscores as a separator, but it's capitalization

05:15 camel case. Like the example they have is pesky and annoying keys, which is capital P, capital A,

05:22 capital A, capital K, all one thing. And like, if you're going to say dot the thing, well, guess what?

05:27 You're going to have to write that in your code, right? Yeah. Unless you make it a camel killer box

05:32 and then it converts it to snake case pesky underscore and underscore and annoying and keys.

05:38 So if you program against an API that's written in another language, you can still do this Pythonic

05:43 code, which is that's amazing, right? Yeah. I like that. That's great. I know it's a good,

05:47 a good name. I mean, I would, it's, it's a fun thing. I personally wouldn't recommend it because

05:55 then your code, you're, it's hard to look up the documentation because it'll be wrong.

05:59 Things like that. Yeah. Yeah. Maybe something more in the affirmative, like snake case converted or I

06:05 don't know, whatever. They have a frozen box, so it's unmutable and hashable, which is pretty cool.

06:11 Yeah. A recast. So you, if you put in strings to this key and that you want it to be numbers,

06:17 it'll always convert it to a float or whatever. So those are all pretty awesome. And then it'll even

06:23 do things like put a prefix for stuff that couldn't be valid, non quoted symbols, right? You could,

06:30 you can say dot name, but you can't say dot three 27 name, right? So you can say, put an X.

06:36 So it's X three, one, seven or whatever. all those things are pretty awesome. let's,

06:42 let me go back here. The other thing is just the converters, right? So there's all the converters

06:46 you might go to dictionary to YAML to Toml, and also from all those things, which I think is pretty

06:53 neat. So what do you think? Like it? Yeah, I do. And there's, there's times where I've really had

06:58 wanted to conveniently just create something with a dictionary, but I wanted to use dot notation.

07:04 So I've used like a name tuple or something like that. And, and this, this is actually,

07:10 this does it for you. So nice. It's really nice. And I've done stuff like that as well,

07:15 where I'm like, all right, I'm going to create an old class. It derives from dictionary and just give

07:19 it a set adder, get adder. So you can do the dot thing on it. But this seems to have just so many

07:24 more other features on top of it that I don't think I'll ever do that again. I'm just going to use

07:28 this box thing. It seems so much better. Nice. It's cool. Yeah. So I think there's just a few

07:33 comments that I got to bring in. Yeah. Roman Wright out there points out that the setting default box

07:39 is not the default setting, which is pretty awesome. Yeah. Chris May points out that, that for this,

07:45 someone needs to think outside this package to get something outside the box, right? To get something

07:51 really, really amazing. and, just, you know, Brandon brainers a little bit jealous of

07:56 your green screen. Hey, that Brandon's the one I had, I had on as a guest for testing code recently.

08:02 So hi Brandon. Right on. Yeah. Very cool. So, all right. well, what's next? What's next is a

08:10 mocking sort of mocking. So Adam Johnson has an article called, making simple mocks with simple,

08:16 making simple mocks with simple namespace. And I had never heard of this. So I'm really glad he

08:21 wrote this article. It's really pretty great. Oh, do I have the wrong? Oh yeah. Let's just cover

08:27 this one. Need my notes. Nevermind. so Adam's actually been crushing it lately. He's got a lot of

08:32 recent blog posts. So good job, Adam. the, the simple namespace is pretty neat. It comes from

08:39 the type standard library. So it's not an extra package you have to have to bring in, which that's

08:45 cool. But one of the things that, so it's like, normally we use unit test mock, or you can

08:51 to mock something. But one of the problems with mocks is by default, if you misspell something,

08:58 it's going to be fine. It mock just lets you do whatever attribute access you want. And that's

09:04 usually not something you want. So, right. Usually the mock is like, let me just get in the way

09:08 and just let things keep working no matter what. Right. And just don't do anything unless you say,

09:14 return this value for this function call or something. Right. You can pass in specs.

09:18 and, and if you have a known object that you're mocking, you use specs and that, that works, but

09:24 sometimes you don't need that much of stuff. So simple namespace is a thing that just lets you

09:31 fill in attributes and then it works to access them. It works kind of like a name tuple or something

09:36 like that, but the usage of it is super simple. And then, and then you can pass this around.

09:42 And so in the, in the parlance of, of like testing, this would be for a fake or a stub,

09:48 not really a mock cause you don't interrogate it. But if you just need to fill it, have something

09:53 that, that, you know, walks like a duck and quacks like a duck, you can use one of these to

09:57 create a duck, and have it get passed in. It's pretty cool and super simple and really easy.

10:03 Love it.

10:03 Yeah. It seems a lot like just what people would have expected mocks to do if you described it.

10:09 Yeah. like it, so, when he has a, it's a great quote, it's as simple as possible with no

10:15 faff around being callable or tracking usage or something. So, in, in a lot of, sometimes

10:20 with mocks, you, try to interrogate. So you have a function call and you interrogate the mocks

10:25 to say, did it get called by my code? These don't do that. You can't do that, but it, it, as long as,

10:31 but you set it up with the attributes you want passed through. and it's pretty,

10:36 just pretty neat. I'm going to use these all the time now. So yeah, it looks fantastic.

10:40 Very nice find. All right. For the next one that I want to talk about, let's go to space.

10:46 Space.

10:47 And embedded things in space. So this is pretty fun. this is an article on CD net talking about,

10:54 raspberry PI. So apparently the European space agency has uploaded and installed and configured

11:03 two new raspberry PI's and not just any raspberry PI's there. These, what is it? Astro PI. That's

11:12 what it is. These are, regular, raspberry PI four boards, model B's with eight gigs of memory

11:18 that have been hardened for space. Okay. Wow. Okay. And the whole goal of having them up here

11:24 is so that students and kids can write code and run experiments and just play with automation,

11:31 but literally using the sensors of the international space station and actually writing Python code and

11:38 machine learning stuff that runs up there in space. Isn't that cool?

11:42 That's incredible.

11:43 Yeah. Yeah. So apparently there's 500 student programming teams in Europe who are all participating

11:51 in this thing called the European astro PI challenge, which is like an education focused, competition

11:58 or startup or whatever. Okay. Yeah. So out of this world, it's out of this world. Absolutely.

12:04 It's really cool to see Python in space. Right. And, here's just more of it. Right. So raspberry

12:09 pies, because you can, you can practice your stuff at home and then have it go up there. Neat. Yeah.

12:15 Very cool. So you have things like the humidity reading and board the ISS and, the various

12:22 sensors and things on there that you can work with and then just do sciencey things. I mean,

12:28 when I was a kid, the science fair was like, well, let's make a little volcano that erupts and like,

12:34 it was this stuff out of paper mache. And you know, these kids get a right code that runs in space. That's,

12:39 that's the next level. Yeah. I admit that I've never done the volcano thing though.

12:43 I kind of, I should do that. Yeah. I haven't either very much. I mean, I did some paper mache thing and I think I had a failed volcano once, but that's about it.

12:51 Anyway, I just think this is really cool. And it's a neat use of raspberry pies. It's a cool way to

12:58 take like a semi-modern computing environment, put it somewhere neat where it has access to real,

13:03 the real world and let kids and other researchers write code on it without going,

13:08 yeah, we're not going to install your program on the ISS. No, no thanks to that.

13:12 This is so neat. I'm blown away. I would have never thought that something like this was going

13:16 to happen in my lifetime. It's nice. Yeah. Yeah. So many neat things. All right. Well,

13:20 that's, that's all I got to say about that, but definitely fun.

13:23 So one of the things that new, new coders have to deal with it. And unfortunately it's,

13:31 it's hard to tell them ahead of time how to deal with it is tracebacks. So tracebacks are,

13:37 they're just part of life with coding and Trey Hunter has a article called reading tracebacks in

13:44 Python. And it's a really great, simple introduction. I love it. One of the things I want to comment on

13:50 is just, just the, the order in which we teach people things and it teaching people how to do

13:57 tracebacks is something that it really needs to be early, maybe like right before testing and right

14:02 after the hello world. But seriously, tracebacks happen so fast. And, and when you start coding,

14:09 an assertion happens that you don't catch and you get a traceback and people panic and go,

14:14 oh my God, I suck as a programmer and you don't, it's not overwhelming. Just kind of walk through

14:20 it simply. And that's what this article is about is how to walk through it simply. And so we're going

14:24 to, it's, if it, if people are new to Python listening to this or how to teach people, you just

14:31 teach people to start at the bottom. You read the last line first. So the last line in traceback

14:35 is the, error message. Let's, scroll to one on here, which is good to know because that's

14:41 not true for other programming languages, the errors at the top and it, it's kind of inverted.

14:46 Oh, really? I forget, but yeah. So the last line is the, the exception and then, and then also the

14:54 message for the exception, if it's, if it's there and then, and then you read up and the, the next two

14:59 lines up are, you've got a file name and a line number and, and then a copy of what the line is.

15:06 and if, and that's, that's the place where the exception actually happened. And these two double

15:11 things, those two lines, the line is called, what do you call it? They're the, stack trace,

15:18 the stack, whatever. Yeah. Call stack. Yeah. It's, this is the call stack. and that's even more so

15:25 because you get lines within functions, right? Not just the, yeah. Yeah. And then, and then

15:30 if you don't understand why you have an exception there, you just keep going up, you keep going up

15:35 to, and sometimes the, the, the exception happened, not in your code, but in some, some third library

15:40 call that you went called. So you're not going to debug that. So you have to debug your, your code.

15:46 So you, it's good to go up enough to where it's in your code. And then if you can't figure it out,

15:52 you just keep going up. and this, this example is actually not obvious to me what was going on.

15:57 So I'm glad he walks through it. So Trey walks through how to read this and it goes up to,

16:04 the fact that, so this is the, the example has a type error because you can't, can't Nate a string

16:10 to an integer. and that's weird because it doesn't look like it's trying to do that. But,

16:16 then he walks up to find out that the, the function is actually taking the standard input,

16:22 and passing it in as a number and one of the arc Vs and you have to convert it to an int first.

16:28 But so that's a, I'm glad to use that example because people new to command line interface,

16:34 coding often forget that, that the input is usually a string, even though you pass in a five,

16:40 it's still going to be a string with a five in it. right. It looks like a number,

16:44 but it's not a number. Yeah. So you have to convert those. and a reminder here,

16:49 this is user input even in, so in this case, it's not going to be harmful just to convert it to an

16:54 int, but, even command line in inner input is input from a user. So you have to sanitize it if

17:01 you need, if you're doing anything like with a database or something. So.

17:03 Absolutely. Oh, that's, that's great. I think definitely that's the kind of thing you need

17:08 to start with when you're teaching people Python, like almost before you teach them to code, like

17:13 how to, if you run into an error, here's how you understand it a little bit. And here's how you

17:19 Google it or go about finding some way to fix it. Yeah. And if you start, especially if you start at

17:24 the top, it's going to be a mess because if you've got a call stack, like 50 functions deep,

17:28 hopefully not, it's going to be a really big trace back and you don't want to try to

17:32 untangle all of it. Just start at the bottom. Yeah, absolutely. And Dean out in the live stream

17:39 says, you know, when you use some Python wrapper on top of a Java microservice and you get a 500 line

17:44 exception, you're like, what have I done wrong to deserve this? Yeah. That's like the advanced

17:48 version of this. Yeah. Speaking of advanced, how about some intrigue? Ooh, yes. So you and the

17:57 listeners may have heard of this person who turned out to go a little bit bonkers on their open source

18:05 code, luckily in NPM and not Python. So JavaScript space. So there's colors and JS, which are two

18:12 widely used, no padding margin NPM libraries used for JavaScript and no JS. Well, this developer,

18:19 Marak Squires, in first, they thought it was a supply chain vulnerability and somebody hacked the

18:25 account. But it turns out, no, no, no. Marak intentionally corrupted both of his libraries.

18:30 So they ran in an endless loop, spitting out random political messages while it would loop around and

18:37 just fill the screen with garbage. So initially thought it'd be a hack, but political and personal

18:42 messages included in the code and on his related websites indicate that it may be the work of a

18:47 disgruntled, lashing out developer. Wacky. Wacky. Okay. So that's not, I was not going to cover that.

18:55 I saw that and I thought that that was pretty interesting. And then Mike LaFontaine points out,

19:01 oh, Brian Krebs, the security guy. I just noticed that this Marak Squires seems to be the same fellow

19:08 who sabotaged two of his own popular open source libraries next week. And he links to an article on,

19:14 in my post, residents of Queen Holmes with suspected bomb making materials charged for some sort of like

19:23 terrorism type of thing. So the same person who sabotaged their, their NPM packages, then was like in the process of

19:33 making bombs and it just kind of shows you an interesting spectrum of where all this stuff lands.

19:40 That's crazy, huh?

19:41 Oh yeah. Weird.

19:42 Yeah. Yeah. Very weird. Oh, I also forgot to point out, this is a, an extra, extra, extra section. So

19:48 short, I got, I got more stuff, but the first one is the guy that went and messed up all the stuff on NPM

19:54 and everybody's dependencies recently has now been charged with creating bombs in Queens, New York. So yeah,

20:02 there's that. Okay. Here's one that's really positive. Andy Griffiths, don't know this person, but they posted

20:08 something incredibly simple that is super helpful when you're building a websites and trying to design them.

20:13 You know, you can go to inspect element and you can like hover over different parts of your page and highlight and

20:20 it'll show, okay, this is actually the div here that is containing this and it has a margin. And so that's why it looks

20:26 like that. Yeah. This guy posted, Hey, struggling with layout, turn on CSS outlines.

20:32 It's a superpower. And all you have to do is write this incredibly simple CSS star is the CSS selector

20:40 outline colon one PX solid red. And what you get is your entire site now highlights all the elements on

20:47 the page. So you can figure out how to style them. Oh, that's pretty cool.

20:51 Given the amount of work. Isn't that amazing? Yeah. Yeah.

20:55 So I definitely think this is something I'm going to try to use when I'm working on design and stuff,

21:01 because it's just so, so much easier than trying to like hunt around with like the debug tools. And then,

21:07 you know, you know, you reload the page and it changes and all that. So quick tip for people there

21:11 who do web stuff, Python 3 10.2 is out and there's actually a decent amount of stuff shipped in it.

21:18 if I do some quick scrolly, scrolly, I would say that's like 30, 40 changes and bug fixes and so on.

21:25 Wow.

21:26 So things like fix hang in run test underscore impede due to race condition or fix this thing in

21:33 documentation or, fixed hash lib used for security option to work correctly with the new version of

21:39 open SSL, fixed memory leak in pyval.eval code EX. That sounds like it might be used a lot of places

21:46 and using the conjunction with the word memory leak, that might be good to fix. Anyway, I already installed

21:52 this on all my servers and have it run in production and it, nothing seemed to catch fire. So that's good.

21:57 Yeah. Very good.

21:58 Yeah. So, Python 3 10.2 is out. That's cool. All right. one, I think one more thing, two more,

22:06 two more things related. I'm doing a YouTube series on a bunch of little short Python lessons,

22:12 and I've got about a hundred videos I want to make and I've made five of them and published or scheduled

22:18 them to go out already. So, I've got a list. Don't do this thing. Anyway, a bunch of little

22:26 tips like parsing data with Pydantic or counting the number of occurrences of items in a list, or

22:31 you've got foreign loops, convert them to list comprehensions. These are all like

22:34 four minute videos that just teach you something really quick and Python. So if people are interested

22:38 in that, they can click the link and then subscribe to my personal channel, not the Python bytes

22:42 YouTube channel, which is awesome, but doesn't have this content, to get more of those.

22:46 So that that's fun. Cool. How do you find time for all this stuff, Michael? You're like everywhere.

22:52 I've been, I've been wanting to do some of these YouTube videos and just try and explore some of

22:58 the ways in which people are like presenting and teaching coding for like six months. And I've just

23:03 decided I'm just going to take two days and just going to do it because I've been putting off for like

23:09 months. So there's that speaking of time. I also, I am controlling our stream and doing all sorts of fun stuff with like this device called a stream deck,

23:18 which you may have heard of the stream deck. You have one too, right? But just not Hawaii.

23:23 Stream deck is this little device here that, lets you basically set up a bunch of buttons and

23:29 control things, which is super fun. And it's built for streamers and whatnot. I decided to see what you

23:35 could do if, let's see, hold up the wrong link. I decided to see what you could do around,

23:41 the stream deck and software development. So, so far I have two profiles, one for PyCharm,

23:49 where you can control all sorts of things like click a button on your little device and it'll show your

23:52 PRs or switch the select modes. You can write and call it multi columns and all sorts of stuff. And then

23:58 also one for Jupyter that are like launch Jupyter and insert, insert your standard imports and add

24:03 cells above and below and rerun them or show me the command command palette and stuff.

24:08 - Neat.

24:08 - So yeah, that also has a video on it as well. And people can check that out, but I've,

24:13 I've got this YouTube profile, I'm not YouTube, GitHub profile, repository where it has all the

24:21 profiles for, the stream deck. So if you want to download it, play with it, customize it,

24:26 those are up there as well. All right. That's it for all of my extras. You got any yourself?

24:31 - yeah. So I wanted to talk about, so this is a cool article by David Amos. so David's

24:38 awesome. He's one of the, one of the gang, the people at real Python, but, it's the articles,

24:44 three things you might not know about numbers and in Python. And, one of the, I don't know where

24:51 the line is. Oh, it's near the top. It's so awesome. He's got a line that says,

24:56 there's a good chance that you've used a number in one of your programs. Yeah, I think so.

25:03 - This is, I, I was, I can get behind that statement.

25:05 - Yeah. So one of the things that like strings have, strings have bug, like functions

25:11 attached to them. They've got methods. and I, you know, we know that it's kind of different than other

25:17 languages, but numbers do too. And, this is something actually I didn't, didn't occur to me

25:23 that, that you can do like two bytes and stuff. So there's, there's functions that you can call on a

25:28 number. There's a trick though. You can't do like 255 dot two bytes. You have to put it in a variable

25:36 name so that it doesn't think it's a decimal point. and you also, or you can put parentheses around it.

25:43 So you can do 255 with parentheses around it and then call, to bytes or something like that.

25:48 So there's, integers have two bytes. so you can convert it to bytes. You can use the class,

25:55 class method from bytes, and you can also do like bit length and a bunch of other functions

26:01 that are pretty cool around integers, which is neat. And then floats have their own methods. Floats have,

26:07 like, is an integer or is integer ratio, which era as integer ratio. So it'll convert

26:13 it to an integer ratio. That's pretty cool. Oh, wow. Like the, some sort of approximation

26:18 and rational numbers. Like, yeah. So, yeah, I don't have, I don't have that example pulled up,

26:25 but no, but that's cool. There's some, I'm no idea about this stuff. Yeah. I've got a bunch. There's a,

26:30 there's a, there'll be some links in the show notes to the, the Python documentation for these.

26:34 it's pretty nice. the, the, okay. So that's the first thing that you should know about

26:40 numbers is there's methods there. So look them up in the documentation. and I'll, we'll have links

26:45 to the documentation. And then the second thing you should know about numbers, second over the third,

26:50 is numbers have hierarchy. So, there's, there's four, four abstract types in, in Python

26:58 for numbers. There's complex, real, rational, and integral. So complex is the complex that most of them

27:05 only have one type in it. Complex, the, abstract type of complex has complex. Real has float.

27:13 Rational has fraction, but integral has both int and bool. So that's neat. their bool and ints are

27:20 related. And then, but then we also have these, decimals. yeah. So there's, I wanted to find

27:27 his stuff on decimal. Decimals don't fit. So decimals have their, they're not really part of this hierarchy

27:34 at all, but they're, they're their own decimal class. So there's not, there's not an abstract class,

27:40 but that's okay. Decimals are great. And people should remember decimal is around if you have,

27:45 if you're working with money or something like that, use super precise science. so yeah,

27:51 these are good. also, because these are just normal types, numbers are extensible. Oh,

27:58 yeah. A comment about floats are weird. Yeah. those are always weird. Those are weird. Yeah.

28:03 The numbers are extensible since these are class classes. You can, you can derive from them.

28:09 but he comments, which is good. You have to be really careful because if you, want to extend

28:16 a class, there's a whole bunch of dunder methods that you have to make sure work right. So maybe you

28:21 don't want to extend it, but you can, you can make your own numeric types. So just the third thing.

28:27 Anyway, kind of a neat article. I'm trying to wonder what you might actually create those for. I mean,

28:32 maybe you might, well, maybe we'll create an integer that has a bounds and is an error if you try to make

28:37 one too large or something. Yeah. I'm not sure. But there's cases.

28:42 I'm thinking on the spot here. Yeah. Yeah. another thing that's amazing is a complex numbers

28:48 are natively built into Python. Yeah. And that's, that's really great. And that's essential for a

28:53 lot of scientific and, and you know, measurement work and stuff is to have complex numbers around.

28:58 They're truly amazing. All right. Well, I think that's all. I mean, I already did my extras. I

29:06 skipped your set here, your articles to ask you about your extras. Do you have any actual extras you

29:10 want to cover? I don't have any actual extras. Have you had any dangerous encounters with like

29:14 warm water? Have you maybe stubbed your toe on a rock or was there a turtle that came by or

29:21 well, so they run into it like an eel. There are eels in the core in the, the reefs there that you

29:25 might want to stay. So I've, I've only been here a couple of days so far. We've been, I've been swimming

29:29 a couple of times right out, right. Like you can, you have to look down, not across to see the beach from,

29:35 from where I'm staying. and so I went swimming right here. it's got, it's kind of fun because

29:40 it drops off right away. So there's a little beach and then it drops, it drops deeper right away.

29:45 And that's, but it's not like a big current. So you can swim really with only going out a few feet,

29:50 which is nice. And then we went to another beach that was like shallow for a long time,

29:55 but then it had coral and stuff. And that was really fun to scuba diet or to not scuba, but,

30:00 snorkel over, and look around. But if you're just wanting to walk out, that coral is like tough to walk on and it hurts. Yeah. That stuff's super sharp. Yeah. But

30:12 having, having a lot of fun. Awesome. Good to hear. Well, I think we should round it out with,

30:18 one or two things here. We got, some jokes. Now I saw Josh out in the audience and he sent in

30:23 some jokes, which we'll make part of this soon, but, I didn't have time for this episode. So we got

30:28 four. Oh, really? Book covers. I love these. Not the O'Reilly. Cause you know, the O'Reilly books,

30:35 they always have an animal and a title and whatnot. So, oh, really are takes that kind of,

30:41 puts a funny spin on it. I'll do this first one. We got 40. Maybe we could do two each. So the

30:46 first one here has a platypus on the screen. It says the little subtitle is the quote is the original

30:53 developer isn't here for a reason. And the title is losing your will to live a code maintenance guide.

30:58 Yes. Written, written by the intern.

31:02 The intern. All right. You want to take this one? so the, the title is, expert vague

31:10 understanding of computer science, probably be able to explain a sorting algorithm if it ever comes up.

31:17 by the practical dev. Yeah. By the practical dev. Very good. Very good. Okay. The next one

31:24 is an elephant. Very proud speaking out loudly. It depends. The definitive guide, the answer to

31:32 every programming question ever conceived. It's a short book. Exactly. All right. bring it,

31:40 bring us home with this last one. Okay. So, works on my machine, the definitive guide,

31:46 how to convince your manager. yeah, I love it. Very good. Very good. Yeah. Well,

31:55 Brian, everyone listening, almost everyone is jealous. I'm sure there's some people in Hawaii,

31:59 like, yeah, I just go there every day, but most other people are probably jealous,

32:04 where you get the record from today. So thanks for making the time. Thank you. it's fun.

32:09 Always fun to be here with a Python bytes people. Thanks for listening to Python bytes. Follow the

32:14 show on Twitter via at Python bytes. That's Python bytes as in B Y T E S. Get the full show notes over at

32:21 Python bytes. If you have a news item we should cover, just visit Python bytes.fm and click submit

32:27 in the nav bar. We're always on the lookout for sharing something cool. If you want to join us for

32:31 the live recording, just visit the website and click live stream to get notified of when our next episode

32:37 goes live. That's usually happening at noon Pacific on Wednesdays over at YouTube. On behalf of myself and

32:44 Brian Okken, this is Michael Kennedy. Thank you for listening and sharing this podcast with your friends and

Back to show page