Keynote

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

We all know Python is awesome. Raymond Hettinger presents Python's awesomeness in a way you can communicate that awesomeness concretely and effectively to everyone you know.

👍︎︎ 2 👤︎︎ u/ManyInterests 📅︎︎ May 10 2018 🗫︎ replies

He said a common concern is scalability but never picked up on that.

👍︎︎ 1 👤︎︎ u/Tweak_Imp 📅︎︎ May 10 2018 🗫︎ replies
Captions
Python since probably before I started using it which heaven knows is a considerable time ago now so without further ado ladies Raymond head injure is going to tell us what's awesome about Python Raymond thank you Steve that's awesome oh my goodness is a lot of you all right how many of you are enjoyed lightning talks this morning are they awesome that was a pike on in general so far was it awesome you should thank Jesse Noah and all of the volunteers for that they're doing an amazing job awesome what's it all about it's about a language that we claim to be awesome squared and uh how do you switch just between me and slides that's it all right slide slides ah there we go now you can't see like little bits of sour cream that my baby just but there are a few minutes ago okay there's my Twitter account Raymond H I teach Python through Twitter I don't tweet when I'm at an airport I teach you about Python 140 characters at a time so I hope I pick up a new few new followers today I currently have 4,000 people learning Python through Twitter so it's an interesting exercise so tell me about an awesome language what is awesome in a Python have you heard of an awesome language is Python any good you like it okay well I'm gonna tell you a little bit about what my role was in building it for a moment I've been a core developer for about 12 years I've made a bunch of the built-in functions that you used several the standard modules built in a number of the language features but my last year year and a half it's just been great I've had a chance to teach a lot of people Python and I've got a chance to experience what's awesome about it and what's not I've got a chance to introduce it to executives and one of the interesting themes is that people have a hard time telling you what it's awesome about the language they always tell you that they like it but they don't know exactly why so that is going to be the subject of this talk again what language do you think is awesome Python so I've got a room of believers already so it ought to be an easy sell so the context for success of Python what put it on the map if cuido had not made it an open-source license you probably would have never heard of a python it's important for the success of a language they have commercial distributions we have active state and in thought and other companies putting commercial distros together you're not a serious language until you have some commercial support Zen Tim Peters in of a Python how many of you read it you should read it all the time it will keep you focused as a programmer Python has does in Ruby heads in lots of languages halves in C++ does not have sin I know because I was on the C++ Standards Committee are you guys impressed by that you shouldn't be I was one of about 20,000 people my qualifications for joked before joining were saying I want to join it was literally designed by a committee and so individual parts are very good but they don't necessarily have the underlying Zen that connects them together something else that makes Python awesome this community see is a wonderful language it doesn't have the same type of frog community we've got all these things are features of a language Pippi the Python repository throws upwards of 30,000 modules that are already made of ready-made solutions for you to download this is awesome this is a context for success of the language and you can't be a great language without a killer app Ruby's got Ruby on Rails we've got lots and lots and lots of killer apps and then thanks to mark Hammond we've run on Windows a bunch of you are probably Linux weenies and look down on your windows brethren but still most of the computers in the world are running Windows and it's important that we are run there and then you need to have books on the language I'm very interested in go I have a hard time finding books on go but Python has a number of extraordinarily of good books to get you started any language that has these features has the context for success let's take a look at our high level quality so of Python in general by the way why am I going over this with you because you guys already know Python right but you're often put in a position to defend Python I heard it was a slow language I heard it doesn't a scale isn't Ruby more popular now isn't it just a passing fad how do you convince a management of the company to switch over to Python so I give some variation of this talk to executives to tell them what it is that makes a Python special and my goal is for you to be able to communicate what makes the language special so ease of learning one of the fantastic things is David Beasley teaches a course where at the end of the second day students are able to write some amazing code one of his exercises is to go through oh wow all I see is just bright lights now this is interesting one of his exercises is to some logs on the web and traverse all of the logs unzip them count up all of the hits on the web pages and summarize the top 20 hits and rank order them and pretty print the output that doesn't sound like a terribly difficult task on the other hand students who couldn't program before in any language can all do it at the end of a second day I think this is impressive Python is a very teachable language the rapid development cycle is part of what it saw famous for if you were selling Python to somebody you tell them all that is in one of its number one characteristics I worked at a high-frequency trading company and speed matters there why would we choose Python the answer is rapid application development we could see I see an opportunity in the morning a model of strategy on it and be trading it in the afternoon it's good of a Java programmer as I ever was I could never do that kind of turnaround cycle with Java the readability and beauty is one of the number one attractors to the language the way to think about the significance of the readability and beauty especially if you're communicating it to somebody else why would they care if the language is beautiful that's because Python programmers will stop on the way to work and write some code they will go home after work and write some code and they will write code on the weekends I couldn't C++ as well I can tell you I never code C++ on the weekends it's not fun it's not beautiful there's a reason that you want a beautiful law language and it's a batteries included language there's a phenomenal amount that you can do right out of the box and lastly one of the things I love are the protocols things like the database API that was well thought out at the beginning so if you learn the databases one time you've learned to work with Postgres you've learned work with Oracle and MySQL all of them have the same interface these are fantastic high-level qualities of the language who thinks it's awesome now bunch of so you dig it here's a bit of Awesomeness this is a five minute problem I was teaching a class one time and someone just gave me a quick example how would you do this in a Python they had a bunch of duplicated images on their hard drive they were a photographer and so they had several terabytes of images that had been copied many times they said how would I eat them and so this is the complete script it starts with a dictionary our hash map we do use OS walk to recursively walk through the directories open each file computer check some of the file and use that as a dictionary key to identify all the duplicates and then pretty print the list of duplicates at the end one of the great things about this little problem that it highlighted for me it was I was able to do it in class as a live demo in under five minutes and run it perfectly and it's not because I've had a lot of practice at Python I can teach other people to do that after a couple days who thinks it's awesome that you can write a program like this in five minutes this is a killer feature of the language is productivity and is beauty and brevity you guys think this is a winning argument for a Python to solve one screen oh it does I actually run the code on my slides before I load it in it does unless I went in and while colorizing it put in a introduce a typo after the fact so I think this is an awesome example of a Python there's a problem with it though I could present you another slide with about the same code in Perl and about the same code in Ruby with about the same brevity and so what I would have convinced you is all scripting languages are basically the same a slightly different syntax you think Python is awesome now now I hear it a lot especially from executives people deciding whether or not to use Python it's just another scripting language as if the choice between yeah we will keep one my language will have one scripting language and any scripting language will do I ask you are they all the same now so what is it that makes your length language special I would say back in the year 2000 it was true all scripting languages were the same but we've grown since then and we have things that make it great things you don't get anywhere else and so I'd like to put these answers in your quiver of arrows so you know why your language is special and what makes it awesome we've got indentation this is the way you write your pseudocode it contributes to pythons clean beautiful appearance and it was a big bold move when cuido did it nobody was using white space of for control flow so it was an audacious move and it was proven to be a winning move even now there people come to Python and initially react to the white space as if it were not a good idea why do you need it I often give these examples these are some see examples the first one prints good morning exactly one time the cause is the trailing a semicolon do I blame the semicolon no it's not the semicolons fault it's a semicolon it's its job to close the four lip what I blame is that tab right there the tab before the print is the big lie it's the thing that promises that the print will be inside the for-loop it's the thing that is not actually doing anything and so the indentation has created an optical illusion likewise in the second set a code I often ask people under what circumstances do these various prints work the important fact is that without the curly braces it's hard to tell how these match up the else binds with the most recent if this is miss indented code it's essential when you're reviewing see to actually run it through a beautifier to reinvent it even if your editor indents for you someone else will mangle it at some point and so the problem is the visual appearance of the code lies does Python ever lie to you with its visual appearance never it's a winning feature of the language these type of errors can't happen in Python good morning will happen 10 times for us and if we unintended it will happen exactly what's winning feature of the language one of my favorite features of the language is the iterator protocol if you pick up the book design patterns you'll learn the iterator protocol can be implemented just about anywhere there's a design pattern for implementing it in Java and in C++ we've got it too what's different for us the answer is we don't have to go through all the usual method calls for the iterator protocol it's built into the for loop and so it makes it effortless to use that makes it effortless to consume iterators how do you make ever uh iterators easily answered we added one additional word yield that was a competing work and it was profoundly improved on Python it made it possible to create iterators effortlessly so what we did different than other languages is smaller the red pill we use iterators everywhere python is just a big box of Lego's where all the pieces fit together perfectly it's really nice when I wrote sorted I wasn't thinking about sets when I wrote sets I wasn't thinking about strings but those parts fit perfectly together that it's actually a complete Python a script that takes the letters of abracadabra eliminates the duplicate and source it is beautiful functional style programming and Python supports it well likewise a set of open file and sorted will open a file loop over all the lines eliminate the duplicates the equivalent in bash is to run through sort and unique why did I put the bash script up the answer is I would like to show the iterators in Python are about as powerful as the pipes and filters are in UNIX it's a big pile of composable reusable tools I think it's a winning feature when you talked about why Python is great these are compelling arguments and then also what I'm teaching Python I like to give this last example this opens takes a list of tuples unpacks the tuples computes the shares times price adding them up giving a cost basis of a portfolio what is the equivalent in SQL it's on the next line to the Python expressions have the same level of expressivity as SQL I think so this is a winning feature when you start to compare it back to languages where people ought to spend a lot of time with for I equals 0 I listened and I plus they can't compete with this level of expressiveness are you digging Python now yeah yeah all right let's comprehensions this is my favorite thing to teach it is arguably the one of the most popular features in the language the beautiful and expressive they were designed based on the set builder notation in mathematics they are profoundly improve the expressiveness of Python I particularly like this last example because it corresponds exactly to the way that you would write this equation in mathematics but the first line shows that it's not just a mathematical concept which raises the question how much stuff should you put on one line Python is a language where initially we try and tell people don't put too much on one line but a list comprehensions tend to be a little bit raw wide is that a problem no it's actually a profound thing because it allows you to think of this not as the individual steps of setting up a for loop and building up a bliss it allows you to think of it as a higher level of I'm summing the cubes or I am lowering all the lines where the line contains info my thought is if it can be expressed in a single English sentence it belongs in a single statement in a language and Python allows you to do it how many just totally dig list comprehensions it was a big win generators this was a capping Yee this was a masterpiece we saw stole it from icon icon was not as popular of a language as it should be so generators didn't become popular capping put generators into Python and Python is popular so lots of other languages are getting them now you can expect that Python is got features that are demonstrating the value of those features and you can expect many languages will have these features in the future it's actually a trend-setting language in some regards it is a big deal the generators give the functions the magic ability to freeze themself in the middle of execution and resume later and that's something that we couldn't do before it enables us to implement co-routines and more importantly lets us implement iterators em almost effortlessly people are amazed when you write fitter raters using classes the way you doing on design patterns and then transform it to the iterator style how it condenses sometimes the code by a factor of 10 it makes it clean and readable and beautiful how many of you dig generators that's cool because this is advanced technology this is the technology of the third millennium not that second millennium stuff back when new year 2000 we're all scripting languages are the same is something we've got other people don't have okay so there's a quick example using generators is very few lines of code on this slide if you try any other way using classes you'll be working really hard this is something makes Python clean and beautiful so I like to call this comprehensions chocolate and generator expressions peanut butter what do you do with peanut butter and chocolate stick them together and make races or KitKat bars so my bright idea this was me generator expressions was to combine list comprehensions and generators to make generator expressions once that idea was out of the bag it was a very natural expansion to make set comprehensions and Dix comprehensions pretty much once you've learned list comps the generator expressions come effortlessly why are the generator expressions a big deal they give you a beautiful expressivity of list comprehensions but the other thing they did for you is give you a lot of speed it runs in a tiny amount of memory it gives you scalability when people complain about Python speed they're often complaining about if it has a big memory footprint nothing is ever in cash when your program runs but if you build your program around iterators everything is small with a small memory footprint it's all in cache and it speeds up markedly this is one of the easiest ways to make Python programs go fast it's something we've got that other people don't have and thinks it's awesome okay here's a couple examples of generator expression a set comprehension and a dictionary dictionary comprehension they're all simple and readable I particularly like this last one it says I want to I read it left to right as the curly braces say I want to make a dictionary where the key is a filename and where the value is the file size and the source of the files is the current directory it reads left to right essentially like you would say an English sentence it reads like a spec I want you to make a dictionary where the key is a filename and the value is the filename and take all the file names from the current directory it reads like a spec this is clean beautiful Python and a winning feature generally just got a problem though they are a boring date I had a date one time when the loved the person talked and they were very eloquent but at the end of the day I hadn't spoken they couldn't tell you my name what's that any fun generators are like that all they do is give you data you can't talk to them this is a solvable problem we have generators that accept inputs now two-way generators this is advanced technology generators and other languages didn't do this before so it is unique to Python and it makes it possible to implement wonderful things like co-routines and to tame twisted in line deferred and I think it makes twisted profoundly more beautiful when you use the in-line defers how many of you are twisted people how many of you used inline deferreds how many of you think they completely Rock they improve your programs quite a bit and make them readable far more than the usual log call back style so we now have two weight generators ones that you can talk to and send data in as well as get them out this was a big step forward so this is a two-way generator example and it shows a twisted inline deferred and this little example I won't go so much into what is doing it is managing a session with a client doing an authentication a database query and for yielding some formatted back at each stage it needs to block a little bit while some activity happens we write it just like sequential code but everywhere it would have blocked we introduced a yield the yield will hand control back over to the event loop let it handle other actions until the data becomes available and then the code will pick up where it left off if you don't appreciate this code you should try and write it the old way writing five separate functions as a call backs and error handlers and daisy chaining them together it's like writing a finite state machine it's not fun this is simple and beautiful and I think it makes twisted a lot better who's digging python now decorators they're expressive and easy on the eyes and just didn't seem like a good idea people asked for decorators oh please give me a decorator but when they asked it was clear anything that you could do with the decorator you could have done without a decorator it didn't add any new functionality to Python we could always do the things we did with decorators so the first few requests for decorators were turned down we don't just said new why because we no arbitrarily in Python introduced unnecessary syntax people asked again and again and so cuido has a way of getting rid of you when you ask him too many times he says if all of you can agree on a syntax I'll consider it something happened that never happened before the entire community agreed on the syntax we gave it to Cueto and he says all right you shall have decorators but not the syntax you asked for you can't make this stuff up that was a true story and boy had we been wrong about them decorators turned out to be a profound improvement to the language I don't know how many of you have ever subclass from a simple HTTP server before but it's not fun here's the new way to write it there are a whole bunch of lightweight frameworks that use exactly this style the smallest of them is itty bigger ones include fat plastic and cherry pie all of them use this style where you use a decorator I could get to associate what is called a route or a path with a function oh this is a piece of code that I have deployed on many machines in the cloud and when I turn it on it runs a web server for me and it supports I can ask for the free space on one of my remote machines that runs the sub process finds the amount of free space and sends it back to me on a web page if I request a resource that is not listed it will give me a 404 if there's in some internal error it'll take care of generating the 500 one for me to add a new service to this script is typically about three lines I put the ad for the route the DEF to define a function and then a body of a function it's that easy this is a profound improvement over the old way of doing things it's why decorators are a winning feature and it's something Python it's God that other languages don't have who's digging Python now all right this is the technology of the third millennium we didn't have any of this stuff in the year 2000 at that point we really work with lent to Perl an equivalent to Ruby these things are all special this is why you should pick Python over one of those other languages the with statement context managers when I first saw them I thought it was a little bit arcane and then I had this profound realization if you want to switch back to me I'm going to try and oversell oversell them who's ever doing the slides picture of me on the screen so I can teach by Shadow Puppets okay no pictures of me I'm going to oversell the the would statement for a moment what was the most important invention in the history of computer languages it was the subroutine where you have three sets of statements and the one in the middle gets repeated somewhere else and you want to factor them out you have a procedure a B and C and then you have P P and Q the bees get factored out into the subroutine in terms of a food analogy if we have a white bread with peanut butter on it and later we have wheat bread with peanut butter on it we factored out the peanut butter everybody knows that subroutine is a big deal every language has it what happens though if it's the bread that remains the same all the things that you can put on a white bread what if you want to factor out the bread and not the body I can put two non white bread I can put peanut butter on white bread is the body that's different what is the complement of the subroutine I'm going to suggest that the subroutine is the part in the middle I can't believe I just did that on a on a recorded video and the with statement is the part on the outside that will be a famous screen shot I'll be different hearing from the diversity police okay you can switch back now slides are safe okay so I'm suggesting that possibly context managers maybe end up being almost as important as the subroutine itself we've only scratched the surface with them we use some things like to factor out locks so that one has been around for a little while this is one that I just checked in a couple days ago how to ignore a an exception and this is one that's been in for a little while in the decimal module to set up a temporary context the with statements sets up a temporary context for you and tears it down it factors out the bread it is a tool for factoring it is a tool for making your code clean and beautiful and it's something we've got that other people don't have who's digging Python now you might have one other objection basic as a with statement there's with statements and lots of languages they don't do the same thing they all do something very shallow they save you from repeated dotted lookups they don't do our setup and teardown so just because it's the same name don't think it's the same thing the Wyss team is a very big deal I encourage you guys to go out and take this tip of the iceberg and drill deeper you can probably do profound things with the with statement the best uses of it have not been discovered yet I expect that if you guys make good use of it it will be copied into other languages in all future languages have it you can be part of discovering something almost as profound as the invention as a subroutine itself I think these are a very big deal something we've got other people don't I want them to have it to go prove to the world that they're awesome fair enough all right abstract base classes I'd like to say every great idea that comes along I just embraced it I fought these cuido went to a program in Java for about six months and he came back with abstract base classes and I did not want them I felt like it was introducing a Chavez feature into Python I've come to embrace them over a time we used to talk about sequences and mappings but everyone meant something different now they have a precise meaning it is very well defined what a sequence is and a mapping is even if you never use abstract base classes you're going to get the benefit of them there's a reason that tuples now have index and count and we thought they never would because it's part of the sequence API it unifies and beautifies the language even if you never use them the fact that we define these things is important and then something interesting came up jump to the bottom part of the slide here what was the mixing capability we had had that before with the user dick but now you can have it with many things the advantage of mixing capabilities it makes it very easy to write your own dictionaries and sets and to customize Python this is a mazing tool for a code reuse it lets you factor out reusable parts of your classes and use them in many places but then there's the weird part how many of you've heard of duck typing who thinks it's awesome in order to take advantage of that either's one discipline just never use the test is instance don't do type checks everywhere you did type checks it precluded you from the ability to do duck typing and you guys just told me that it was awesome anybody puts in type checks is defeating a duck typing your first six months of Python if they were like me I put type checks everywhere my next six months we're taking them all back out the maturing of a Python programmer is to not use his instance anywhere so what did cuido do with it he says you can use a is instance texting again and still get duck typing how we get the ability to lie to his instance I thought this was incredibly weird but there are some great use cases for it pretty much people could start using his instance again doing their checks and then if we want to duck type and in check something class that was previously unseen we can lie about our capabilities so the old duck typing said if it looks like a duck walks like a duck and quacks like a duck it's a duck the new duck typing says well it said it was a duck and that's good enough for me maybe it says it's a Django Pony so this is something else that is making Python awesome the abstract base classes give us tight definitions they also give us another tool for reusing and organizing our code and the now allow us to reintroduce his instance checking this was all cuido another bit of awesomeness he does not run out of great ideas who thinks python is awesome now these are things we've got other people don't have here's an example of an abstract based class our use of an abstract based class this is a inheriting from collection set all you're required to do is implement a under it or dunder contains and under Lynne what do you get in return this is the complete code for implementing a set based on list it's fantastic you don't see it in there because we've inherited this can do a subset test a superset test set equality hits op provides a disjoint it provides Union its provides intersection it provides a difference and it provides symmetric difference is that a lot of code we use I think so this saves you from writing a hundred lines of code to get a to implement a set how much testing is required to get this code up and running very little because you're inheriting from a class that from an abstract base classes already been heavily tested things like this improve your productivity monumentally I think abstract places classes are a big deal who digs them now this is summary the winning language features things that we have that other people don't have we compelling reasons to use Python over another scripting language are the indentation the iterator protocol again other languages you can do the iterator protocol what's different for us is we swallow the red pill everything that can be an iterator is everything that consume an iterator does all the parts fit together perfectly there's capito generators that were awesome list comprehensions and generators that you can have a full conversation with you can send data into them and pick a data back out decorators were something that we thought wasn't a good idea and we were wrong they were a profoundly good idea they are a fantastic tool for code reuse and the with statement where I've suggested to you might be as important as the invention of the subroutine itself and abstract base classes another tool for code reusability how many of you think Python is awesome I normally don't like people to take my science slide decks and give my presentations and go up and be me later please take this presentation and go be me take it back to me people say should we decide on Python or Ruby show them this deck there's something we've got they don't use it as a selling point and now you actually have the ability to answer what is it that makes your language awesome we'll switch back to slides just one more because as Jesse said there's one more thing somebody said it before Jesse but I like the way Jesse said it better what have we got we've got talent we have the old superstars now there's a lot of stars in the room these are the superstars the superstars are the people who have just blown me away in terms of there's some of the smartest people I've ever met the names at the top are all the one named ly one namers like madonna and sting there's a cuido and uncle Timmy and Barry and F BOTS and copying and glyph people just know who they are just from that part but there's some other superstars we have to spell their whole name so Frank was Vicki with Jai thon Arman who is probably the smartest person I have ever met Alex Martelli who has an encyclopedic knowledge these are the people who took me from being a good programmer to a great programmer they're superstars and is something the language has if you wonder why the language is good it's because of these people there's a long list of the Python committers here at some point I recommend you take a look at don't just use the language find out how these people are the superstars made this language great but what's cool is now we have young rising superstars people who are just blowing me away who are young and are accomplishing more early ages than I could have ever imagined they will beat the socks off of everybody at the top of the page because they're already doing as much at an early age there's more than are listed here but Benjamin Pedersen started as a Python release manager at 15 years old he's amazing Jessica Keller who was supposed to speak to you this morning and couldn't is a rising star she is a phenomenal talent and a community leader Alex Gaynor who is also one of the smartest people you ever met will ever meet an important contributor to Django and to pie pie and now back to cpython itself and he say becoming a computer community leader himself these are your stars this is something that we have that other people don't other languages have one or two stars we have a lot of them and here's some of your super stars if your name is not on the list I think you're a star too these are the ones that have just blown me away as I've gone through that's what pythons got that other languages don't have so thank you very much for listening to the top please use this slide deck and go teach people Python it's already been uploaded tell them why the language is great and have a wonderful rest of your Python thank you very much so we do have a couple of minutes if our questions are Raymond we do have a microphone up front here just come up to the mic I can be called out ok so the first question comes from Alex MA telling me Rhonda danger yes sir you had a slight mistake there and the mistakes name is Miranda it's got nothing to do with your rights when arrested it's got everything to do with the first language to use white space for semantically has Kell inherited it from Miranda this is not the first time I've been schooled by Alex Martelli there was a predecessor for by indentation Rhonda Warner was not the Maverick that we think of he stole it from Miranda this is your first Miranda warnings ok five bucks yes sir hi so I love fightin I've been evangelizing it for 15 years but I have a question that sometimes people ask me that I don't know a good answer to why is Len a function function and not methods why is length of function and not a method well if we were Ruby we would have made everything a method and that was a reasonable approach to a problem lots and lots of languages had a length function and people are used to it and it's very readable and you're translating code from somewhere else when you think about problems you tend to think of it as a function and not a method underneath the hood we use a method to unify the language so I believe that cuido chose us for readability it is it follows people's thinking conventions and so python abandon the rigidity of saying everything must be a method and realize that people sometimes think a little bit differently so the short answer to your question is practicality beats purity for now it occurs to me that some of the winning features you name like decorators from the with statement are the sorts of things that make Python actually non-orthogonal you'd use higher order functions for example a scheme I think it's because they make common patterns available lexically just as you're reading the code yes where's they be hidden behind documentation otherwise can you think of some other patterns you might want to surface lexically as well not off the top of my head something I think but I can think of something that I forgot to mention that may additionally makes Python awesome pie pie pie pie is going to be I believe in the future the primary way that you interact with a Python and it's going to give us our last bit of Awesomeness it's going to give us our speed while we get to keep the beauty so it's a very big deal apologize for not answering your question straight up I just think that if we'd already had a great idea and it was a mature and the right thing to do it would already be done so think of new ones they haven't been done is a harder to answer question yes sir well in that vein there are ideas that people have and things that other languages do the Python doesn't that might be good ideas yes so what is the best idea to get things rolling on getting those into Python and what should people do when they get told no good question if you want to take your favorite feature from another language and inject it in Python and you get told no what do you do perhaps the know is a good idea Python is beautiful for a reason and part of the reason is the things we don't put in right now there's a discussion of whether or not to put enums in the language enums are very popular another language isn't necessary in those languages and make up some for some of their deficiency I'm of the belief of I programmed up I thought for a very long time every day and if never needed an enum that's it a fairly beautiful proposal is on the table so it has some chance of being in but for the most part the language we bid are off with not sticking more things in it is already a very beautiful vibrant language but it needs more than language features is better and more modern libraries our URL libraries for instance they really show their their age we're hoping to put requests in Python 3 for for example 2 nice it put your effort in the libraries don't join Python and try and your first proposals to muck up the language and I'm gonna like take dictionaries and twist them into knots we've already got nice dictionaries go out there and build a Python project when an existing Python project and make it awesome but don't take a mature beautiful language join the developer community and say hey my first contribution is going to be to inject a whole bunch of features from Java because if you Java has things that is really good at fit its paradigm that don't necessarily make sense in Python so I would say the number one thing you could do to improve Python is show restraint that means don't join the Python ideas list there's no restraint on that list I'm bagging on them a little bit is actually a great place to play and discuss wild ideas but when they get a little bit too serious like hey we're going to take every random idea we can think of and checked it to the language it is heart-wrenching to watch some of those threads because you fear that some of them might actually happen I would just say show some restraint and try to not destroy the thing that is a beautiful before your eyes because it would be easy to mangle it yes sir so I totally agree with you that Python is awesome I have the same experience as you in that I teach programmers Python and I see some places that are not awesome yes it seems to me that improving the language we can make it more awesome by adding cool new stuff or by fixing the stuff that sucks and I just wonder if you would quickly identify for for us your perspective on what sucks what sucks I actually want to give a talk on what sucks but it's not appropriate for a keynote where you're supposed to cheerleading go poop pythons the best yes there's some things that suck I don't like if dunder name equal dunder main I think it's one of the ugliest pieces of code I've ever seen if it were up to me special or magic methods wouldn't be called special or magic they are just regular methods that happen to have a shortcut for calling them dunder add is a normal method but there's a plus operator that happens to call it for you so the naming convention just says is a shortcut every time we call them magic we suggest that they are actually more magical than they actually are there are quite normal in that regard one thing that I have wanted over and over again is constants in Python fortunately I didn't push too hard to put them in because pipe I may make them entirely unnecessary it figures out what a constant is a constant is a variable that just didn't happen to change and pi pi is good at ascertaining those things oh I am at a loss right now of a couple other things that have irritated the heck out of me but I imagine you've got a couple on your mind do you have a couple to volunteer I think that error takes me I love programming in Python because of the beauty of the language in the community and I really appreciate you putting the names up with some of the stars for us to think would you share some of your thoughts on a project like get tip which is a way that we can thank people in the community I don't know about that that may be your opportunity to say at some point do it but I took Chad Whitaker who's I've got a question for you guys to wrap it all up how many of you are I have tried Python three that's great how many of you use it commercially so it's a so it's a little bit young it's come of it many of you intend to be using commercial how many of you tried PI pod it's wonderful for me to be able to ask this question because you know its core developers we don't actually know our download statistics because you can pull down pi PI or in so many different ways we really don't know how many people use it so appreciate that a little survey it looks like everybody has tried Python 3 now you need to start using it commercially thank you very much I'll turn it back to superstar Steve Hollen Thank You Raymond so we all feel better about being Python programmers now so I don't know whether any of you know Raymond has actually been doing is little bit to maintain and develop the international Python community and we have his wife Rachel here with the latest member of the read the head ginger family Matthew wearing the cutest little Python shirt you have ever seen in your life Raymond thank you very much indeed generation of Python programmers here thanks very much we'll take a break and talks will resume after that break thank you again
Info
Channel: Next Day Video
Views: 27,257
Rating: 4.9787798 out of 5
Keywords: psf, pycon2013, plenary, RaymondHettinger
Id: NfngrdLv9ZQ
Channel Id: undefined
Length: 42min 56sec (2576 seconds)
Published: Sun Mar 24 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.