WEBVTT
00:00:00.020 -->
00:00:04.620Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:00:05.120 -->
00:00:09.740This is episode 429, recorded April 21st, 2025.
00:00:10.620 -->
00:00:11.380And I am Brian Okken.
00:00:11.620 -->
00:00:12.560And I am Michael Kennedy.
00:00:13.000 -->
00:00:16.299And this episode is sponsored by the folks at Posit Workbench.
00:00:16.680 -->
00:00:17.180Thank you, Posit.
00:00:17.500 -->
00:00:20.120Also, listen to them later in the show, of course.
00:00:20.420 -->
00:00:24.940If you'd like to connect with us, please do so on BlueSky or Mastodon.
00:00:25.200 -->
00:00:27.540We have all of those links in the show notes.
00:00:28.039 -->
00:00:29.020We'd love to hear from you.
00:00:29.180 -->
00:00:32.360Love to hear new topics that you think we might want to cover.
00:00:32.780 -->
00:00:37.340And if you'd like to listen to us live, head on over to pythonbytes.fm/live.
00:00:37.660 -->
00:00:39.900Usually Mondays at 10 Pacific time.
00:00:40.280 -->
00:00:45.340But you can also use that link just to find the YouTube channel to watch older episodes too.
00:00:45.880 -->
00:00:52.640And finally, you don't need to write anything down while you're listening because we'll just send it to you.
00:00:52.920 -->
00:00:55.160So head on over to pythonbytes.fm.
00:00:55.520 -->
00:01:06.140join the mailing list or the newsletter list, and you'll just get an email sent every week with all the links, but it also has backup information of what you need to know to understand the story.
00:01:06.580 -->
00:01:10.420So really nice, and we don't use it for spamming or anything like that.
00:01:10.740 -->
00:01:11.080Michael,
00:01:11.220 -->
00:01:11.980what do you got for us?
00:01:12.260 -->
00:01:13.040I might have a problem.
00:01:13.820 -->
00:01:15.920I like to self-host stuff too much.
00:01:16.860 -->
00:01:23.200It means I end up with things that I have to take care of rather than just have a login somewhere.
00:01:23.700 -->
00:01:24.820But I'm going to make a recommendation.
00:01:25.220 -->
00:01:58.320nonetheless. So if you find yourself using Slack, I think even Zoom maybe, if you're using Jira, if you're using Notion, and you would like that all in one place rather than a bunch of different apps that you pay for, for free, for open source, self-hosted, or paid as hosted if you really want to do it that way, there's a project or tool or platform, whatever, called HULY, H-U-L-Y, An open source platform that serves as an all-in-one replacement for Linear, Jira, Slack, and Notion.
00:01:58.510 -->
00:01:59.060How cool is that?
00:01:59.320 -->
00:01:59.520Okay.
00:01:59.900 -->
00:02:00.080Okay.
00:02:00.450 -->
00:02:05.220So maybe you want to have some place to do chat conversations.
00:02:05.560 -->
00:02:07.260Or you want to store your documents.
00:02:07.800 -->
00:02:11.340Or you want to do project management and sync it with your GitHub issues.
00:02:11.940 -->
00:02:12.660Or do planning.
00:02:13.140 -->
00:02:15.560So all of this stuff is super cool, I think.
00:02:15.860 -->
00:02:17.760And even has video meetings.
00:02:17.800 -->
00:02:27.720So if you want to also get rid of Microsoft Teams or Zoom or whatever, it gives you a nice private way to do all that, right?
00:02:28.080 -->
00:02:28.540And I don't know.
00:02:28.560 -->
00:02:35.500It just, that really resonates with me as just like, here's this cool open source thing that we can do and we can run it.
00:02:35.680 -->
00:02:37.900And we don't have to have all these different services.
00:02:38.520 -->
00:02:40.100And I don't know about the others.
00:02:40.520 -->
00:02:42.200I honestly don't know the pricing for Jira.
00:02:42.540 -->
00:02:43.400I've never paid for Jira.
00:02:43.820 -->
00:02:44.800But Slack is out of control.
00:02:44.940 -->
00:02:49.480Slack is super expensive for what you get from it and things like that.
00:02:49.760 -->
00:02:55.480And so having this with a bunch of dashboards, and it even has a nice self-hosting option.
00:02:55.980 -->
00:03:00.120So if you are a person who does Docker Compose, guess what?
00:03:00.400 -->
00:03:05.820You just Docker Compose up, dash D, you have your whole platform running, which I think is pretty excellent.
00:03:06.220 -->
00:03:10.380So that's how a lot of these self-hosted things are shared and maintained.
00:03:10.660 -->
00:03:12.660So you don't even have to figure out how to put it into Docker.
00:03:12.880 -->
00:03:14.340It's already there and set up.
00:03:14.640 -->
00:03:16.400So you just run it and you're good to go.
00:03:16.660 -->
00:03:17.500Just make sure you do backups.
00:03:17.920 -->
00:03:18.500Pretty neat, I think.
00:03:18.680 -->
00:03:19.280That's pretty cool.
00:03:19.580 -->
00:03:19.760Yeah.
00:03:20.040 -->
00:03:21.760And it also syncs both ways with GitHub.
00:03:22.200 -->
00:03:25.480So if you've got GitHub issues, it will sync with the issues.
00:03:25.600 -->
00:03:27.680And if you have GitHub projects, it'll sync with those projects.
00:03:28.100 -->
00:03:35.580So its project management tools and its issue management, like its JRO replacement stuff, is mirrored on GitHub.
00:03:35.700 -->
00:03:37.080So not everybody has to use it.
00:03:37.140 -->
00:03:40.880Like you can have internal people on this and external people just perceiving it as GitHub.
00:03:41.200 -->
00:03:42.600I have GitHub issues.
00:03:43.160 -->
00:03:45.940I was just talking to my therapist about it the other day.
00:03:47.240 -->
00:03:47.740Yes, indeed.
00:03:48.280 -->
00:03:50.320And John Outer says, this is why I love the podcast.
00:03:50.780 -->
00:03:52.580Thanks for the holy recommendation.
00:03:53.210 -->
00:03:55.780And loves self-hosting as much as I do.
00:03:55.920 -->
00:03:56.340So awesome.
00:03:56.700 -->
00:03:56.940Thanks, John.
00:03:57.240 -->
00:03:58.940Yeah, holy self-hosting, Batman.
00:03:59.360 -->
00:03:59.560Anyway.
00:04:00.320 -->
00:04:01.340Holy self-hosting.
00:04:01.710 -->
00:04:02.120Indeed, yeah.
00:04:02.840 -->
00:04:06.820The problem is you can end up with, you're like, well, now I've got 12 apps to back up and maintain.
00:04:07.220 -->
00:04:11.280But it is super cool to be able to say, we don't have to worry about data privacy.
00:04:11.740 -->
00:04:18.760We don't have to worry about sharing things or if those places get hacked or if they change their business model or if they go out of business.
00:04:19.180 -->
00:04:22.840You know, you've got a self-hosted open source thing that you can fork and just run.
00:04:23.100 -->
00:04:24.140And there's something cool about that.
00:04:24.340 -->
00:04:28.880I wonder if anybody's got like, because this sounds great, but I don't really want to do that work.
00:04:29.280 -->
00:04:32.040So I wonder if there's a self-hosting as a service service.
00:04:33.440 -->
00:04:34.460I think there actually is.
00:04:34.460 -->
00:04:36.140I'm forgetting the name of it right now.
00:04:36.300 -->
00:04:39.320But yes, there basically is a self-hosting as a service.
00:04:39.580 -->
00:04:40.240Yes, it's amazing.
00:04:40.520 -->
00:04:40.700Okay.
00:04:41.860 -->
00:04:43.280What an interesting idea.
00:04:43.820 -->
00:04:44.620All right, that's it for this one.
00:04:44.740 -->
00:04:45.080Over to you.
00:04:45.240 -->
00:04:45.500Okay.
00:04:46.320 -->
00:04:50.600Well, I am going to talk about critical, oh, what are those called again?
00:04:50.880 -->
00:04:51.380CVEs?
00:04:51.640 -->
00:04:56.800Common, I should have practiced this, common vulnerability and exposures.
00:04:57.400 -->
00:05:07.100So CVEs, we're used to talking about these when there's like really wide-scale attacks, but they kind of happen all the time, like vulnerability problems.
00:05:07.780 -->
00:05:22.720And this propped up this last week rather urgently because the CVE system, the entire system is sort of built on top of a non-for-profit called MITRE.
00:05:23.160 -->
00:05:32.880And the entire system, but there was a contract with the U.S. government to maintain this database of CVEs.
00:05:33.620 -->
00:05:45.340However, and this has been around for 25 years, it ran the risk of possibly going away because of all of the cost-cutting that our current lovely administration is doing.
00:05:46.120 -->
00:05:48.300And so the – It's a
00:05:48.300 -->
00:05:48.640waste.
00:05:48.990 -->
00:05:50.700It's government waste, I tell you, Ryan.
00:05:51.480 -->
00:05:52.120Like what?
00:05:52.500 -->
00:05:56.140And it's not – it doesn't even – like a lot of people involved in this are volunteers anyway.
00:05:56.340 -->
00:05:57.100That's just nuts.
00:05:58.340 -->
00:06:03.400Anyway, so a 25-year-old CVE program ran the risk of going away.
00:06:03.740 -->
00:06:11.460There was a letter that came out from the vice president of MITRE, gave notice of potential halt of operations.
00:06:12.140 -->
00:06:15.600And apparently they had been worried about this for some time.
00:06:16.800 -->
00:06:29.560So there's this, in order to deal with this and possibly make sure that we don't have this risk in the future, There is now a CVE Foundation.
00:06:30.000 -->
00:06:44.620So there's been an announcement as of April 16th that the CVE Foundation has been formally established to ensure long-term viability, stability, and independence of the CVE program.
00:06:45.480 -->
00:06:47.500This is really cool.
00:06:47.580 -->
00:06:49.720It isn't something they just suddenly did.
00:06:49.780 -->
00:06:51.980They've been thinking about it for a while and planning it.
00:06:52.240 -->
00:07:05.160And there's an announcement at thecvefoundation.org, and they're going to release information about, you know, the transition, what its structure is, the transition planning, opportunities for involvement later.
00:07:05.520 -->
00:07:07.020But right now there's just an announcement.
00:07:07.420 -->
00:07:11.600But this is pretty crazy that we would, like, run the risk of losing this.
00:07:12.480 -->
00:07:15.120This is how we talk about vulnerabilities.
00:07:16.540 -->
00:07:23.880But apparently there was an announcement also, I couldn't find the link to it, that they did not lose funding.
00:07:24.240 -->
00:07:28.060So it's okay for now, but it's still the for now part.
00:07:28.300 -->
00:07:29.880So the foundation wants to
00:07:29.880 -->
00:07:31.560make sure that it's not a just for now.
00:07:31.710 -->
00:07:31.860I
00:07:31.860 -->
00:07:35.200still think it's something that we should fund as a government,
00:07:35.480 -->
00:07:37.480but, you know, it is what it is, I guess.
00:07:37.780 -->
00:07:57.620I think we should fund it, but also I feel like maybe that should be more of like kind of in the style of Python or Mozilla Foundation or, you know, that it's tied to the U.S. government rather than just an international organization of people who are really committed to tracking security issues.
00:07:57.980 -->
00:08:01.900It doesn't take insane amounts of funding to track these things, you know what I mean?
00:08:02.160 -->
00:08:02.960Yeah, I have
00:08:02.960 -->
00:08:03.300no idea
00:08:03.300 -->
00:08:04.000what the work is
00:08:04.000 -->
00:08:05.480involved for this.
00:08:06.580 -->
00:08:10.300Yeah, I don't know what the work is, but it's not like there's a lot of server infrastructure.
00:08:10.410 -->
00:08:13.300It's not running like AI farms or something.
00:08:13.820 -->
00:08:22.740Yeah, and it probably, the funding probably should be coming from like all the ISPs and big companies and stuff that are benefiting from this.
00:08:23.300 -->
00:08:24.980I think so too, but hey,
00:08:25.120 -->
00:08:27.320I'm not against the U.S. government.
00:08:27.540 -->
00:08:31.640I'm glad they were doing it, but it just puts it in a weird situation these days.
00:08:32.039 -->
00:08:32.180Yeah.
00:08:32.400 -->
00:08:35.940Yeah, and Python became a CVE authority not too long ago.
00:08:36.200 -->
00:08:50.020the PSF so they can announce their own CVEs around things in the Python space without going through an external, not convincing some other participant to allow them to list their CVE for Python and
00:08:50.020 -->
00:08:50.380so on.
00:08:50.590 -->
00:09:05.880So there's a bit of a distributed aspect of it. Now, before we jump on to thinking our sponsor, Ryan, the thing that I was thinking of is Alestio, E-L-E-S-T-I-O, and it says fully managed DevOps or your cloud and open source software.
00:09:06.600 -->
00:09:07.920And I've not used this.
00:09:08.020 -->
00:09:14.140It's not a recommendation, but we, as in they, deploy and manage open source software to your cloud provider of choice.
00:09:14.540 -->
00:09:22.480So create a Hetzner server, point it at it, and then pick the various self-hosted things that you want and they will self-host them there for you.
00:09:22.560 -->
00:09:23.600I believe that's how it works.
00:09:23.740 -->
00:09:24.040Awesome.
00:09:24.340 -->
00:09:25.280Self-hosting as a service.
00:09:25.700 -->
00:09:25.880Who knew?
00:09:27.120 -->
00:09:27.380Who knew?
00:09:27.480 -->
00:09:28.080Well, I guess you did.
00:09:28.740 -->
00:09:28.840But
00:09:28.840 -->
00:09:32.060we also have Posit
00:09:32.060 -->
00:09:33.500doing pretty awesome stuff.
00:09:33.560 -->
00:09:34.440Why don't you tell them about it?
00:09:34.540 -->
00:09:37.620This portion of Python Bytes is brought to you by the folks at Posit.
00:09:38.080 -->
00:09:41.640Posit has been making huge investments in the Python community lately.
00:09:42.140 -->
00:09:47.640Known originally for our studio, they've been building out a suite of tools and services for Team Python.
00:09:48.060 -->
00:09:51.860Have you thought of all the things that go into a Python data science project?
00:09:52.280 -->
00:09:57.960You need your notebook or IDE for sure, but you also need a server or cloud environment to run it.
00:09:58.120 -->
00:10:02.560A version of Python, packages, access to your databases, and internal APIs.
00:10:03.140 -->
00:10:04.080That's a lot to set up.
00:10:04.320 -->
00:10:09.680And if you change any of these things when you return to your project months down the road, you might get different results.
00:10:10.340 -->
00:10:17.380Wouldn't it be nice to have all of this set up for you in one easy-to-access place whenever you want to get work done?
00:10:17.640 -->
00:10:19.320That's the goal of Posit Workbench.
00:10:19.720 -->
00:10:27.780Posit Workbench allows data scientists to code in Python within their preferred development environment without any additional strain or on IT.
00:10:28.180 -->
00:10:36.380It gives data scientists access to all the development environments they love, including Jupyter Nobix, JupyterLab, Positron, and VS Code.
00:10:36.600 -->
00:10:39.000And yet it helps ensure reproducibility.
00:10:39.340 -->
00:10:39.960Here's how it works.
00:10:40.100 -->
00:10:57.140You or your team set up Posit Workbench on a powerful, dedicated server within your organization or on the same cloud service that is hosting your most important data sources, such as AWS, SageMaker, Azure, GCP, Kubernetes, or pretty much anywhere.
00:10:57.540 -->
00:11:01.380There, you create dedicated, pre-configured environments to run your code and notebooks.
00:11:02.000 -->
00:11:07.680And importantly, you also configure access to proprietary databases and internal APIs.
00:11:08.260 -->
00:11:18.660When it's time to onboard a new data scientist or start a new project, you just fire it up in Workbench, and it's fully configured and ready to go, including the infrastructure side things.
00:11:19.060 -->
00:11:22.120All of this is securely administered by your organization.
00:11:22.460 -->
00:11:28.500If you work on a data science team where consistency matters, you owe it to you and your org to check out Posit Workbench.
00:11:28.940 -->
00:11:35.440Visit pythonbytes.fm/workbench today and get a three-month free trial to see if it's a good fit.
00:11:35.740 -->
00:11:37.960That's pythonbytes.fm/workbench.
00:11:38.360 -->
00:11:40.280The link is in your podcast player show notes.
00:11:40.760 -->
00:11:41.860Thank you to Posit for
00:11:41.860 -->
00:11:42.980supporting Python Bytes.
00:11:43.520 -->
00:11:43.840Indeed.
00:11:44.440 -->
00:11:45.260All right, you ready for the next one?
00:11:45.560 -->
00:11:45.700Yeah.
00:11:46.000 -->
00:11:46.480Database.
00:11:46.980 -->
00:11:47.700Database things.
00:11:48.180 -->
00:11:59.180So here's a really interesting free web app, I guess it is, that lets you draw and import and export and visualize database diagrams.
00:12:00.220 -->
00:12:06.980So either you've got your own projects or where I see this being super useful is you're put onto a new project or you're a consultant.
00:12:07.680 -->
00:12:11.320And they're like, and welcome for the two weeks.
00:12:11.560 -->
00:12:13.540Here's the database and here's the app.
00:12:13.820 -->
00:12:14.660Please fix it by now.
00:12:15.000 -->
00:12:17.120And you're like, how do I even get started?
00:12:17.200 -->
00:12:18.060What is here, right?
00:12:18.340 -->
00:12:24.300So this thing called drawdb.app allows you to draw, copy, and paste database diagrams.
00:12:24.620 -->
00:12:30.440And if you go there, you can see there's really nice graphics, and the UI is quite nice for interacting with it.
00:12:30.680 -->
00:12:32.600So it says you can try this for yourself for free.
00:12:32.800 -->
00:12:46.120And what's interesting is it asks you to choose your database, as in like SQLite or Postgres or SQL Server or whatever, because it imports and exports SQL statements.
00:12:46.620 -->
00:12:52.420and those different databases have different database SQL dialects, which in and of itself is annoying.
00:12:52.660 -->
00:12:55.200But let's just say, I don't know, I'll do Postgres, right?
00:12:55.540 -->
00:13:04.600And you come in here, you can add a little table and you can then like edit that thing, give it a column, multiple columns, different data types, and create a second one.
00:13:04.610 -->
00:13:15.740Then you can say like grab one column from one database or one table rather, and then drag it and drop it in a field on another column and that'll create a foreign key relationship automatically, for example.
00:13:16.120 -->
00:13:21.060And you can go over and you can say file, export SQL or import from SQL.
00:13:21.300 -->
00:13:28.000And that'll generate the data definition language, DDL stuff, create scripts and create the indexes and columns.
00:13:28.500 -->
00:13:33.420Or if you got a database, you can export it and then load up this diagram based on what was in your database.
00:13:33.880 -->
00:13:37.120And then visualize it, tweak it, save it, or just try to understand it.
00:13:37.240 -->
00:13:37.920That's really cool.
00:13:38.220 -->
00:13:38.340Yeah.
00:13:38.660 -->
00:13:40.100And as far as I can tell, it's free.
00:13:40.120 -->
00:13:40.420I don't know.
00:13:40.520 -->
00:13:43.020Maybe there's some point where I pay for it, but I don't think so.
00:13:43.060 -->
00:13:48.360So anyway, I think it's a great little app and people should check it out if they have databases they want to visualize.
00:13:48.740 -->
00:13:52.240And, you know, I'm usually starting with a drawing anyway, like drawing it on paper.
00:13:52.500 -->
00:13:54.500So why not just draw it in something like this?
00:13:55.300 -->
00:13:58.160Exactly, because then you could say generate my table from this.
00:13:58.460 -->
00:13:59.580Yeah, yeah, that's cool.
00:13:59.940 -->
00:14:00.120Cool.
00:14:00.520 -->
00:14:02.060So not much more to it, but there it is.
00:14:02.900 -->
00:14:03.180All right.
00:14:04.180 -->
00:14:13.400Well, my last item is a, and I'm only going to cover part of this, but it is a blog post by Edward Lee called 14 Advanced Python Features.
00:14:14.020 -->
00:14:24.660And, you know, it's a listicle sort of a thing, but there's a lot of those like advanced Python features, and he even talks about this, that are really, really not that advanced.
00:14:24.820 -->
00:14:29.940They're just stuff that people should know and some fun things for, you know, advanced for beginners, but not really.
00:14:30.820 -->
00:14:40.240But I kind of really like this because there are things in this list that I really wish I would have learned earlier.
00:14:40.780 -->
00:14:42.840And so anyway, I'll just jump in.
00:14:42.920 -->
00:14:44.280There's a few things I wanted to pick out.
00:14:45.260 -->
00:14:47.100First off is typing overloads.
00:14:47.300 -->
00:14:50.740And this is something that I just learned while reading this article.
00:14:50.830 -->
00:14:51.820I didn't know you could do this.
00:14:52.110 -->
00:14:56.840So within the typing module, you can say from typing import overload.
00:14:58.060 -->
00:15:08.140And then one of the things you can do then is you can essentially list overloaded operations, overloaded definitions for a function call.
00:15:08.400 -->
00:15:15.260And it's not really like full function overloading like we have in C or something like that.
00:15:15.740 -->
00:15:17.300However, there's return types.
00:15:17.500 -->
00:15:27.660So let's say there's an example here that if you only pass in, if you pass in a certain type, then you're always going to get a list of strings.
00:15:28.090 -->
00:15:33.440And if you're passing in a different type, then you always get a single string back.
00:15:33.990 -->
00:15:38.180Those sorts of things are nice to have for typing or return types.
00:15:38.550 -->
00:15:40.620And that's something that we don't really have in Python.
00:15:40.710 -->
00:15:44.820You can't have a difference in just return type.
00:15:45.180 -->
00:15:47.500So having that in place is kind of neat.
00:15:48.680 -->
00:15:50.240I'm going to play with this like right away.
00:15:50.340 -->
00:15:51.420So that's pretty cool.
00:15:52.440 -->
00:15:54.180Overloading functions with the typing.
00:15:54.560 -->
00:15:55.560So I'll have to try that.
00:15:56.140 -->
00:16:01.920Next up is something I've been using a lot lately is keyword only and positional only arguments.
00:16:02.480 -->
00:16:11.020And specifically, so we now have these, a star or a slash that you can separate the parameters to a function, the parameter definition.
00:16:11.560 -->
00:16:18.380And the asterisk or star means that everything after that is keyword-only parameters.
00:16:19.680 -->
00:16:25.800And then the slash is positional-only parameters, and that's everything before.
00:16:26.330 -->
00:16:28.420So one of them is before and one of them is after.
00:16:28.470 -->
00:16:33.940So in his example, he's got A, B, and then slash, C, D, star, E, F.
00:16:34.050 -->
00:16:37.260So that means A and B are positional-only.
00:16:37.680 -->
00:16:43.860C and D can be positional or keyword, and then ENF have to be keyword only.
00:16:44.090 -->
00:17:09.880And the thing that I'm doing a lot is why I'm using the keyword only one a lot is for functions that have, and these are all not usually API functions, but internal functions that have a lot of parameters that have defaults, And you would almost hardly ever pass it like just positional only because the defaults are, it doesn't really matter the order.
00:17:10.060 -->
00:17:11.959It's just they all have defaults and there's a bunch of them.
00:17:12.280 -->
00:17:21.900So I really want all the callers of that, every place we're calling the function, to list which variable or which parameter they're defining as they call the function.
00:17:22.040 -->
00:17:23.500And you can do that with the asterisks.
00:17:23.839 -->
00:17:24.260Super cool.
00:17:24.260 -->
00:17:24.780Yeah, that's really cool.
00:17:25.100 -->
00:17:28.600Another thing that I think is really useful for that is if it's the same.
00:17:28.860 -->
00:17:35.420A lot of times you're going to give it like numbers or true and false where you don't have a variable that you're passing in, but you have just
00:17:35.420 -->
00:17:36.900some kind
00:17:36.900 -->
00:17:37.440of constant.
00:17:37.960 -->
00:17:42.160Because if it goes 7, 7, 5, true, true, false, you're like, whoa, whoa, whoa.
00:17:42.520 -->
00:17:42.840What are these?
00:17:43.880 -->
00:17:44.200It's not
00:17:44.200 -->
00:17:48.500like variable names are there where like X, Y, Z, like, oh, those are the dimensions.
00:17:48.760 -->
00:17:52.000No, it just goes 7, 7, 5, like, hmm, which is which?
00:17:52.050 -->
00:17:52.580You know what I mean?
00:17:52.980 -->
00:17:53.180Especially
00:17:53.180 -->
00:17:55.000true, true, false, true, something like that.
00:17:55.100 -->
00:18:00.320If you force keyword arguments on it, then it's a much more readable thing at the call site.
00:18:00.800 -->
00:18:12.120Yeah, things that are generic, like you're just adding things, it doesn't really matter that your add function is A and B, but for true and false, you really want, what do those mean?
00:18:12.840 -->
00:18:14.020I like those. It's a good addition.
00:18:14.720 -->
00:18:31.440Last thing I want to come to is there's a list of, he said number nine is Python nitpicks, which is really a few topics around it, but it's listed as a nitpick because it's a bummer when people aren't utilizing this.
00:18:31.880 -->
00:18:42.280So the for else statement, and this is, I think, probably still controversial, is maybe a little bit, is whether or not you should utilize the else clause in for statements.
00:18:44.300 -->
00:19:00.140And kind of, you know, it's like often before the else clause or without using it, you might have to say, Like something, his example is like a found flag to say, you know, whether or not you actually found the item you were looking for while you're iterating the for loop.
00:19:00.780 -->
00:19:02.240And then you can check that later.
00:19:02.620 -->
00:19:11.060But there's else you could just say, you know, if you didn't find, if you never hit anything inside the for loop, you can else out.
00:19:12.000 -->
00:19:13.560It's still a little weird, though.
00:19:13.680 -->
00:19:19.760I still find it very, very good to make sure that you comment that to say what's going on in the else.
00:19:19.960 -->
00:19:21.560They're using what you're doing in there.
00:19:21.920 -->
00:19:22.440So, okay.
00:19:23.160 -->
00:19:23.880I'm anti-else.
00:19:24.200 -->
00:19:25.040I'm definitely anti-else.
00:19:25.700 -->
00:19:32.240And, by the way, Guido, I heard him quoted at one point that said, if I had to do it over again, there would be no else statement.
00:19:32.540 -->
00:19:33.360I think it's just weird.
00:19:33.700 -->
00:19:36.800It's like, does it happen when it breaks or does it happen when it doesn't break?
00:19:36.980 -->
00:19:39.340Like, is break the thing you're looking for and else is the other?
00:19:39.820 -->
00:19:42.380Or is break something weird and it was supposed to go?
00:19:42.480 -->
00:19:43.780Like, it's just, I don't know.
00:19:44.040 -->
00:19:48.520I know you can save one line of code, but it's too ambiguous to me.
00:19:48.600 -->
00:19:48.960It's too weird.
00:19:49.040 -->
00:19:52.480So else is if you didn't break, right?
00:19:52.700 -->
00:19:53.280I think so.
00:19:53.600 -->
00:19:53.660Yeah.
00:19:54.000 -->
00:19:54.160Anyway.
00:19:54.260 -->
00:19:54.720I
00:19:54.720 -->
00:19:55.060think so.
00:19:55.200 -->
00:19:56.120Anyway, the
00:19:56.120 -->
00:19:59.560fact that you got us, like, we got out of this discussion is like, I don't know, it makes it weird.
00:19:59.740 -->
00:20:00.740For me, I'm out.
00:20:01.440 -->
00:20:03.280I know I could do it, but I don't do it.
00:20:03.380 -->
00:20:03.560Okay.
00:20:03.900 -->
00:20:09.640Also, the Walrus operator, it's been around since 3.8, and 3.8's already deprecated or like end of life.
00:20:10.040 -->
00:20:13.820So we can start using, definitely use the Walrus operator.
00:20:14.200 -->
00:20:17.720Again, it's just saving one line of code, but I like it.
00:20:17.760 -->
00:20:18.720How about Walrus?
00:20:19.000 -->
00:20:19.520I'm a
00:20:19.520 -->
00:20:39.900fan of wall I created the wall we're just operating this weekend I believe for me I like it because it's the locality of definition like I'm creating it for this if block and I'm going to use it in this if block if I need it otherwise it's kind of like it's part of this thing not something that might make sense later down the line probably for me I like it
00:20:41.200 -->
00:20:51.940a couple more short circuit evaluation I don't really care I'm fine with a bunch of if-else's actually, if that's all you can do.
00:20:52.100 -->
00:21:04.120But the short circuit, which means using or, utilizing or to say, if you're going to do one thing or the other, you can use or short circuits.
00:21:04.540 -->
00:21:09.140So once you hit one of them that's true, anything after that's not going to get ran.
00:21:09.640 -->
00:21:13.660And you can kind of go crazy with that though and actually put logic in there.
00:21:14.020 -->
00:21:19.540and I'm really not a fan of putting logic in the short-circuiting or operation, but that's just me.
00:21:20.160 -->
00:21:25.420But I am a fan of operator chaining and I often see this with people coming from different languages.
00:21:25.890 -->
00:21:28.120They don't know you can do operator chaining.
00:21:28.380 -->
00:21:34.900So I'll see like if zero is less than X and X is less than 10, you don't have to do that in Python.
00:21:35.340 -->
00:21:38.420Just put them together and say zero less than X less than 10.
00:21:38.780 -->
00:21:40.240So operating chaining is right.
00:21:40.460 -->
00:21:44.620But also I think that we should have been a little more strict with operator chaining.
00:21:45.520 -->
00:21:49.500And I don't think it, like, you can put anything in there, right?
00:21:50.100 -->
00:21:53.580But I don't think you should, like, for numbers, it should be less than.
00:21:53.680 -->
00:21:57.080You should not be doing, like, greater than operator chaining.
00:21:57.260 -->
00:21:57.900It's just weird.
00:21:58.540 -->
00:22:00.320The number line is small to big.
00:22:01.340 -->
00:22:02.440So please do that.
00:22:02.760 -->
00:22:04.100That's all I wanted to cover for that.
00:22:04.300 -->
00:22:06.240But there's a bunch of other great stuff in here.
00:22:07.500 -->
00:22:09.680So definitely check out this article.
00:22:10.580 -->
00:22:11.040Here's the
00:22:11.040 -->
00:22:11.560full list.
00:22:11.620 -->
00:22:12.820So LRU cash.
00:22:13.120 -->
00:22:13.320Love it.
00:22:13.980 -->
00:22:14.480Love it.
00:22:14.700 -->
00:22:15.000f-strings.
00:22:15.400 -->
00:22:15.620Love it.
00:22:15.940 -->
00:22:16.260Nitpicks.
00:22:16.640 -->
00:22:17.840I have some nitpicks with that statement.
00:22:17.940 -->
00:22:18.320But you know what?
00:22:18.360 -->
00:22:18.640It's fine.
00:22:18.860 -->
00:22:20.400Good, good, good find there, Brian.
00:22:20.680 -->
00:22:20.960All right.
00:22:21.320 -->
00:22:27.240Well, we're done with our main topics and I don't have any extras, Michael, but do you have any extras?
00:22:27.700 -->
00:22:30.180Well, I thought the answer was no, but it turns out to be yes.
00:22:30.560 -->
00:22:30.740Okay.
00:22:30.980 -->
00:22:37.380Because something I just heard about right before was, oh gosh, assuming on this is all weird.
00:22:37.840 -->
00:23:48.860so there's remember i wrote this article that said unsolicited advice for mozilla or firefox or something like that saying you know what stuff that you guys are doing is does not lead me in the right path and here are five ideas that you might write try as a business to exist down the line please do that and so they're actually coming i mean i really doubt they gave a crap about what i said but they are introducing this um this new suite of services how about that so thunderbird all seems to be based around Thunderbird, their email client, and Thundermail, which is a really interesting term. But they're offering like Thunderbird appointment, which is kind of like Calendly or TidyCal or whatever. Thunderbird Send for private file sharing. I used to love Firefox Send, but it got abused by hackers and other badness. And so then it stopped working. But you could put just like, here's a URL, here's a password. The whole file just goes away in three days, give it to someone, and then they could have it. It was really great. It's all end-to-end did all that kind of stuff. Also, some AI thing because of course there's an AI thing. And then Thunderbird Mail, hosted Thunderbird Mail, all that. Anyway, I think this is a cool idea. Thunder Mail.
00:23:49.260 -->
00:23:50.920Thunder. Thunder. Thunderbird.
00:23:51.540 -->
00:23:52.980Oh. So, very cool.
00:23:53.800 -->
00:23:57.200That's all I got for my extra. You can't spell mail without AI.
00:23:57.700 -->
00:24:00.100That's right. Yeah, well, I'll tell you what, that seems to be
00:24:00.100 -->
00:24:03.420what they think in their features that every mail client I find is like.
00:24:04.020 -->
00:24:09.380And now we have some terrible AI thing that will just erase all your formatting and make you have to rewrite your mail if you try to use it.
00:24:09.660 -->
00:24:10.960But it's here, and it's great.
00:24:11.800 -->
00:24:12.420No, it's not.
00:24:14.080 -->
00:24:15.420Anyway, shall we?
00:24:16.300 -->
00:24:22.920You know, Brian, we try to make it not too political here, but I got a political joke, in a sense. Okay, awesome. Are you ready for it? Yeah.
00:24:23.320 -->
00:24:33.700So, this one came to us by many people, so thank you to everyone who sent us this in. Have you noticed, I don't watch the news a ton, but have you noticed that there's some talks about tariffs lately?
00:24:35.480 -->
00:24:35.880Yeah.
00:24:37.540 -->
00:24:42.240I mean, look, I think genuinely it's fair to say, like, let's discuss tariffs.
00:24:42.580 -->
00:24:47.720And if other countries have tariffs on us, does it make sense for us to not?
00:24:47.910 -->
00:24:48.320I don't know.
00:24:48.450 -->
00:24:48.580Whatever.
00:24:48.690 -->
00:24:50.540I think there's a debate that can be had.
00:24:50.770 -->
00:24:57.180But the way that it's been done is so just chaotic and random and on and off again and so on.
00:24:57.620 -->
00:25:12.100But somebody decided that if that's a good idea for a global trade, boy, oh boy, wouldn't that be a cool idea for Python and for program languages and particularly for these pesky external outside of the standard library packages.
00:25:12.600 -->
00:25:12.700Yeah.
00:25:12.770 -->
00:25:18.860So I present to you tariff, a Python package that imposes tariffs on Python import statements.
00:25:20.380 -->
00:25:21.840And no, it's not just a joke.
00:25:22.080 -->
00:25:23.840It's literally version one.
00:25:23.910 -->
00:25:24.980It's not even zero anymore.
00:25:25.170 -->
00:25:26.520And it is released on PyPI.
00:25:26.680 -->
00:25:28.340So you can literally pip install tariff.
00:25:29.060 -->
00:25:29.660What does it do?
00:25:30.200 -->
00:25:33.020Well, boom, fire, fist emoji, fire emoji.
00:25:33.440 -->
00:25:35.280A little reference back to Signal.
00:25:36.060 -->
00:25:40.460The greatest, most tremendous Python package that makes importing great again.
00:25:40.800 -->
00:25:45.060Tariff is a fantastic tool that lets you impose import tariffs on Python packages.
00:25:45.380 -->
00:25:50.140We're going to bring manufacturing back to your code base by making foreign imports more expensive.
00:25:51.000 -->
00:25:52.700And so all you got to do is import it.
00:25:52.920 -->
00:25:55.700You set your rate on the different libraries.
00:25:57.020 -->
00:26:01.820like 50% tariff on NumPy, 200% tariff on Pandos and so on.
00:26:02.340 -->
00:26:06.600And then when you import NumPy, it's literally 50% slower.
00:26:06.780 -->
00:26:08.220It takes 50% longer than before.
00:26:08.460 -->
00:26:08.940What do you think?
00:26:09.180 -->
00:26:09.900That'll teach them.
00:26:10.380 -->
00:26:10.480Yeah.
00:26:10.780 -->
00:26:11.400That'll teach them.
00:26:11.940 -->
00:26:12.100Yeah.
00:26:12.400 -->
00:26:15.400We're going straight back to self-hosted vendoring it in.
00:26:16.120 -->
00:26:16.380Yeah.
00:26:16.680 -->
00:26:17.940But what's not is it works.
00:26:18.520 -->
00:26:22.160Like, you know, it's not just a weird joke idea, but somebody made it.
00:26:22.540 -->
00:26:23.280It's open source.
00:26:24.220 -->
00:26:24.820And the hat.
00:26:25.660 -->
00:26:27.600The hat is
00:26:27.600 -->
00:26:27.840good.
00:26:28.860 -->
00:26:29.140Why
00:26:29.140 -->
00:26:30.240tariff, you may ask?
00:26:30.480 -->
00:26:33.820Because foreign packages have been stealing our CPU cycles for too long.
00:26:33.960 -->
00:26:37.140It's time to put America first and make importing fair and balanced again.
00:26:37.480 -->
00:26:38.560Obviously a parity package.
00:26:38.940 -->
00:26:39.720Use it at your own risk.
00:26:40.800 -->
00:26:43.220Yeah, other people stealing our CPUs.
00:26:43.420 -->
00:26:45.240We need to steal our own CPUs.
00:26:45.640 -->
00:26:46.040Exactly.
00:26:46.380 -->
00:26:47.620That is how we're going to do it.
00:26:47.880 -->
00:26:48.060Yeah.
00:26:48.360 -->
00:26:49.880Well, that's what I got for you.
00:26:50.040 -->
00:26:50.420Is it funny?
00:26:50.540 -->
00:26:52.100I don't know, but I think it is certainly amusing.
00:26:52.940 -->
00:26:53.600It's not.
00:26:53.800 -->
00:26:56.800when I look at my 401k, it is not funny, but,
00:26:57.240 -->
00:26:58.020you gotta laugh.
00:26:58.100 -->
00:26:58.480You gotta cry.
00:26:58.820 -->
00:26:59.940Those are one of your two reactions.
00:27:00.400 -->
00:27:01.000Might as well laugh.
00:27:01.480 -->
00:27:02.340Glad I like my job.
00:27:02.500 -->
00:27:03.560Cause I'm going to be here for a while.
00:27:03.940 -->
00:27:06.440anyway, thanks.
00:27:06.680 -->
00:27:07.760Thanks for everything, Michael.
00:27:08.020 -->
00:27:08.500Thanks for the joke.
00:27:08.780 -->
00:27:10.260Thanks to everybody that shared them.
00:27:10.360 -->
00:27:14.260like we said, a lot of people, sent that in, but that is not a waste.
00:27:14.580 -->
00:27:19.760That also gives us a signal that we, we might want to cover it if a lot of people are thinking about it.
00:27:20.000 -->
00:27:20.660So, so thanks.
00:27:21.060 -->
00:27:21.200Yeah.
00:27:21.320 -->
00:27:21.580Thank you.
00:27:21.900 -->
00:27:22.080All right.
00:27:22.400 -->
00:27:22.520Bye.
00:27:22.780 -->
00:27:23.060Bye Brian.
00:27:23.200 -->
00:27:23.420Bye everyone.