Skip to content
Home » University of Michigan » Python for Everybody Specialization » Programming for Everybody (Getting Started with Python) » Week 6: Chapter Four: Functions

Week 6: Chapter Four: Functions

Get ready to unlock the power of functions! While they might seem unnecessary in the early chapters, functions become essential tools as we dive into more complex programs. They’ll help us organize our code, improve readability, and keep our sanity intact! Buckle up, because the world of functions awaits!


Lectures materials


Video: 4.1 – Using Functions

Chapter 4 Summary: Functions: Don’t Repeat Yourself (DRY)

Main takeaway: Functions store and reuse code, preventing repetition and increasing maintainability.

Key points:

  • Purpose: Avoid writing the same code multiple times and simplify future edits.
  • Definition: Use def followed by name (e.g., thing) and optional parameters.
  • Calling: Use name with parentheses (e.g., thing()) to execute the stored code.
  • Benefits:
    • DRY principle: Reduce redundant code and enhance program clarity.
    • Modularization: Break down complex programs into smaller, manageable units.
    • Reusability: Share code across different parts of the program.
  • Examples:
    • Built-in functions like print, input, max, and min.
    • User-defined functions like converting a string to an integer (int).
  • Next: Learn to define and use your own functions!

Additional notes:

  • Functions don’t execute during definition, only when called.
  • Function calls pause the current code execution, run the function, and then resume.
  • Python remembers where to return after finishing the function call.

Here’s a tutorial on “Functions: Don’t Repeat Yourself (DRY)”:

Getting Started with Functions

What are functions?

  • Think of them as reusable code blocks that perform specific tasks.
  • They help you organize your code, improve readability, and avoid repetition.
  • They’re essential for writing well-structured, maintainable programs.

Defining a Function

  1. Use the def keyword:
def function_name(parameters):
    # Code to be executed
  1. Indent the code block: This defines the function’s body.
  2. Use parameters (optional): These are like placeholders for values you’ll provide when calling the function.

Calling a Function

  • Use the function’s name followed by parentheses:
function_name(arguments)
  • Provide arguments (if any) to match the parameters.

Example:

Python

def greet(name):
    print("Hello, " + name + "!")

greet("Alice")  # Output: Hello, Alice!
greet("Bob")    # Output: Hello, Bob!

Key Benefits of Functions

  • DRY Principle: Don’t Repeat Yourself! Write code once, use it many times.
  • Modularization: Break down complex programs into smaller, manageable units.
  • Reusability: Share code across different parts of your program.
  • Better Organization: Improve code clarity and maintainability.
  • Testing and Debugging: Easier to test and debug individual functions.

Common Built-in Functions

  • print()
  • input()
  • type()
  • int()
  • float()
  • max()
  • min()
  • …and many more!

Creating Your Own Functions

  1. Identify reusable code blocks in your program.
  2. Define functions with clear names and parameters.
  3. Call the functions as needed to execute their code.

Practice Makes Perfect!

  • Start experimenting with defining and calling your own functions.
  • Explore different examples and use cases.
  • The more you practice, the more comfortable you’ll become with using functions effectively!

Hello and welcome to Chapter Four. Now, we’re going to come back and visit what I alluded to in the first
chapter of the fourth pattern for code. Sequential, conditional, iterations,
and then store and reuse. This is the store and reuse pattern,
and the basic essence of the store and reuse pattern is that we, as programmers,
do not like repeating ourselves. So, if you have like four lines of code, and
you want to do the same thing later, and you put it down here. And then, you put it later. And what if
you find something wrong with those four lines of code? Then you’ve got to
find all the places, and, let’s just say you put it
100 places in your program. You’ve got to find all 100 places and
fix the mistake. So we say well, why don’t we put that
one place and give it a name, and then use it in all the other places? And that’s exactly what store and
reuse is. It’s the idea of don’t repeat yourself,
D-R-Y, don’t repeat yourself. So, this is what we’ve got here,
stored and reused steps. And functions are those things that
we’re storing and reusing. So, let’s take a look. So the new keyword that we’ve got is def,
d-e-f, which stands for start the definition of a function,
define the function. def is the keyword, it ends in a colon, just like lots of things that
start an indented block. That starts an indented block. You get the name the thing that you’re
storing, I call it thing for now, and there’s some some optional parameters,
which we’ll see later, inside parentheses. Right now, we have no parameters
in this function, and there is an indented block, and then when
you de-indent that defines the function. All right, so this thing has
been de-indented, but it also this t is de-indented and so that is
the definition of the end of the function. Now, it’s key to understand
that as this is parsed or looked at by Python it
actually doesn’t execute. There’s two executable statements there,
print and print. But all it does is it remembers it. So it sort of like stores it into a little
area almost like a variable, right, like a variable x = 2. Well, there’s some x out there and
you put a 2 in it. Well, there is this thing out there,
t-h-i-n-g. And there’s two lines of code in it. So it’s like a variable
except that it holds code. Okay, so a function is kind of like
a variable, except that it holds code. And then most importantly,
it doesn’t execute these lines of code. So, no output, there’s no output here. Nothing comes out from that first part. Now, it has a side effect of extending
Python, so there’s this new thing, “thing”, that we can call. So we call this calling or invoking. So we’ve made one of these things,
now let’s call the thing. So we say thing(). And that’s the syntax to
say go call the function. Now we’ve been using functions,
print is a function, right? print() parameter,
that’s how print works. Well, thing is a function, thing(), but there just happens to
be no parameter in this because, this is a really simple function. So, what happens is,
def does nothing but remembers thing, then says oh, let’s go back and
run that thing, run those two lines. So out come Hello and Fun. And then it comes back down to here, runs
this print statement, so out comes Zip. And then it says oh, run that code again. So this is the don’t repeat yourself part.
Run this, print, print, do it, again, and now the program’s done. So it comes back here. So one of the things about functions is
that Python, when it calls a function, it kind of remembers
where to come back to. It’s like, okay, go up here. Now I’m done, where do I go back to? Oh, I remembered to come back to here,
so then do this. Okay, here’s my coming back place,
run up again, run, go back to the coming back place. So it’s like it sort of pauses this code, pause
here, run this, and then resume there. So it’s like jump and then come back. So we’ve been using functions all along,
things like print, input, type, float, int. int and float do conversions, type tells us what kind of a thing
something is, print prints stuff out and input reads stuff from the user. And then later we’ll talk about functions
that we’re going to make and then use. As we extend Python by building functions, we can think of them as like
new reserves or function names. And so the naming conventions for function
names is the same as for variables and you want to avoid things like reserved
words and other things like that. So, function’s some bit of reusable code, we define a function using a def
keyword, and then we call or invoke. We mostly say call but
I think of invoke as a little clearer. Like invoke this function, do it right, here with a function name,
parentheses, and then optional arguments. So here’s a function that we haven’t
played with yet called the max function. It’s also another one of
Python’s built-in functions and this is an example of an argument. We’re passing in a string and we’re asking
max finds the largest of something and in this case it’s going to scan through
this string and find the largest letter. And it decides that w
is the largest letter. Apparently lowercase letters
are bigger than uppercase letters. And then it does what is called
a return and it gives us back the thing that it’s like, you asked
me to find this and now I found a w. Here you go and
then that w gets assigned into big. So if we do a min,
which is a different function, we pass it in the same Hello world,
it looks for the smallest thing. And for some reason,
space is the smallest thing. So this space is what gets
sent back to tiny, and there’s a space right there and
away we go. So, at some level you can
think of this max function as a chunk of code that’s been
built into Python before. We are passing in an argument,
which is a string. There’s some code inside here that runs,
reads through the argument, comes in and then it reads through and looks at that stuff, reads some stuff, and
then sends us back the answer, which is w, which is
this is called return. It returns us something. And then that w, so you think it’s working
on this side of this assignment statement. The w is the residual value,
once the max function is executed. And then that then is assigned into big,
and so big has the letter w in it. So the kinds of things that we’ve been
playing with so far are type conversions. And so here it goes Python,
it’s looking at what to print. It’s like oh, I’ve got an expression here but
wait a sec, I want to do this but wait, oh, I’ve got to call a function. So there’s a little float sitting here,
a little code for float. We pass a 99 in and we get back 99.0 and then that 99.0 divided
by 100 gives us 0.99. So it sort of pauses its calculation and
then it goes and runs this float code and then comes back. Now we’re going to make a variable i,
42, say what kind of thing is it, it’s an integer. Now, what we’re going to do is we’re
going to pass this integer into that same float code, 42 into the same float code,
and out’s going to come 42.0 and that’s going to replace this in the function and
that’s going to be assigned into f. And so surprise, surprise, we have 42 in f,
we ask what kind of a thing it is. And then,
it’s going to do this calculation. Remember, it’s going to do
the multiplication first, the division second, so
it’s looking at 2 times float. Oh, hold on for a second. Stop for a moment. We now have to run float,
which means we take this 3, we pass it into the float code. The float sends us back, in this case, 3.0 which replaces
this in the function as 3.0. And then we end up with this
calculation of 2 times 3.0 or 6.0 and then on and on and
on the rest of it finishes. So you think of these function calls
as suspending what we’re doing, just for a brief instant,
we’re going to suspend that and then wait, and then the function will give us
something back to replace that, okay? String conversions as well. We have been using int and
float to do things like read things in because input is a function but
it always gives us back a string. And it gives us a string. We might use this
as a number. So the string 1-2-3 is not the same as 123. That is a string.
And if we do something crazy like add 1 to it, Boom, we get a traceback because
we can’t concatenate string and integer just cause they’re the wrong type. But if we take this same 123, and here’s
a little code called the int function. We pass sval in,
which is 1-2-3 the string and we get back 123 the integer then that
replaces this in the function and then 123 integer is assigned into ival. And we say we hey, what kind of thing is ival? Well, it’s an integer. We can add 1 to it and get 124. And we just came from a previous chapter, if we happened to call an int and
we pass hello bob, in, I should have used a different color. We pass hello bob in. This code blows up. [SOUND] And it says oh, traceback,
and that blew up. So even a function can blow up. And you know what? Our code blows up. So the function blows up and away we go. So up next we’re going to stop
using built-in functions and actually define and
use a few functions of our own.

Video: 4.2 – Building Functions

Here’s a summary of the key points about functions:

Defining Functions:

  • Use the def keyword followed by the function name and parentheses.
  • Indent the code block that makes up the function’s body.
  • Parameters (optional) act as placeholders for values to be provided when calling the function.

Calling Functions:

  • Use the function name followed by parentheses.
  • Provide arguments (if any) to match the parameters.

Key Concepts:

  • Definition doesn’t execute code: It only stores the code for later use.
  • Call to execute: The code runs when the function is called.
  • Return values: Functions can optionally return a value using the return statement.
  • Arguments: Input values passed to the function when called.
  • Parameters: Placeholders for arguments within the function definition.

Example:

Python

def greet(lang):  # Define a function with a parameter
    if lang == "es":
        print("Hola")
    elif lang == "fr":
        print("Bonjour")
    else:
        print("Hello")

greet("en")  # Call the function with an argument

Additional Points:

  • Functions can have multiple parameters.
  • Parameter names within the function don’t have to match argument names.
  • Functions without return values are called “non-fruitful” functions.
  • Functions with return values are called “fruitful” functions.

So now we’re going to build
some of our own functions. We sort of saw a little bit of
that syntax at the very beginning. We’re going to explore
using the def keyword and some of the choices that we get to make. And so the essence of this,
I’ll say this probably 20 times. The def statement only
defines the function. There’s a side effect to it, but
it doesn’t actually run the code. It just remembers the code, and then later
we will call and invoke the function. So here’s an example of some dysfunctional
code that’s not going to work very well. And so we come in here, we set x = 5. And you don’t have to have the def
at the beginning of the program. We do a print statement,
so out comes Hello. And then we do a def statement and
that cruises through here. And the result is, is you have extended
Python to have this thing called the print_lyrics function, and
it’s got two bits of code in here. Now, this print does a de-indent,
so that sort of blocks this off. That little bit inside
the block is the function, that stuff’s been copied up to there, and
now it continues on and it prints Yo. And it adds 2 to x and then prints x, and
out comes a 7 and now the program is done. What happened to these lines of code? And the answer is they never executed,
they never executed. And that’s because the def statement
doesn’t automatically run the code. You must invoke. We did not invoke the function. Not sure if that’s a happy face or
a sad face, it’s a wry face, it’s a wondering what’s going on face. So we didn’t invoke it, right? We didn’t invoke it and so it did not
work and we didn’t do any output. Now why we did this? I don’t know why we did this. Question mark, question mark. Who knows why we did this. But what we really meant to do probably
is something that more looks like the next bit. Once you define it we got to call it,
and that’s the reuse part. We had the store part working but
not the reuse part. So here we go, this is a little
more of a functional bit of code. Set x to 5, print out hello,
out that comes. Define it, this creates no output but
the de-indent causes this block to be part of that, and that’s been stored. Store. Now we print out Yo, and so out comes Yo. And then we call print_lyrics. And again, print is a function,
has parentheses with parameters. This has parentheses with no parameters. We didn’t put any parameters in,
we’ll get to that in a second. Print_lyrics now says, oh, run this code. So out comes these two print statements, then we add 2 to x,
print it, and then out comes 7. So this is the store, this is the reuse,
this is the call, this is invoke. Okay? Okay. So everything we’ve shown so
far has no arguments, except this max did have an argument. That max is input and then we will get something back, the w, and
then the w will get stuck into big. So arguments are input, so
if we want to define arguments in our own functions that we’re making,
we just put them in the parentheses. Now it’s like a variable,
we’re choosing a variable name. But this variable sort of doesn’t exist. This lang variable is best
thought of as an alias. It’s an alias for whatever the first
parameter is going to be when that particular function invocation happens. So we’re going to invoke
this function three times, we’re going to put in parentheses
three different things. This is a way to have code that’s almost
the same but a little bit different. By pushing in different parameters,
then the code does something different. And so this really is just a placeholder
to say whatever the first parameter was. If that first parameter is es,
then print this. If that first parameter is fr, print that. Otherwise, print that. So. As our program runs, this accomplishes
nothing, doesn’t run any code, but it creates this thing
called greet out there. And we’ve indicated to Python
we expect a parameter. We expect that when this is invoked or
called, we want one parameter. So then we call greet, and again,
Python remembers to come back to here. And then it fires up to here and
starts this line of code. And en, lang is an alias for en. So it’s like lang is not es, lang is not fr, so this code runs,
out comes Hello, and then we’re done. And it says go back to where you
remembered you were supposed to pick up next, which is here. Okay? So it says pick up next. Then it goes on to the next
statement here, greet. So it’s going to run this function again. Remember where to come back to,
which is right here. Jump up to here, and
then make es this time be what lang means. So now, lang is es, so this is true. We run that code, we come out and we print out Hola and then we go
back to where we remembered before. Then we continue on,
come to this code, okay? So now we’re in this code, is time to run greet again,
so we jump up to here. And then this time fr is lang, and so it runs here, that’s false, this is true
so it prints that out, prints out Bonjour. Then it comes and it remembers. Oh, forgot to remember where to come back to,
and continues on, okay? So you see the whole pattern there,
a lot of different pretty colors there, but you get the idea. That it gets run a couple of times and
lang is the alias for whatever the first
parameter happens to be. And that’s the best way to think about it. Whatever the first parameter is, I will use lang within here, I’ll use
lang to refer to the first parameter. You might name this thing, don’t do this,
but you could name it p1, p1, p1. So parameter one, no, Python wouldn’t care
but it’s really just the first parameter. Lang itself is not really a variable in that there is no piece
of memory that lang belongs in. It really sort of is
an alias of something else. Okay? Okay. Now, when we’re looking at like the float
statement or the input statement, we see things like input parenthesis blah, blah, blah, parenthesis equals x, right? And so we’re going to assign something. The question is. what is this
residual value that comes back? And within the function, we,
as the writer of the function, get to determine what that residual
value is by the return statement. So, basically even though this is really
a trivial function, has no parameters, the return statement does two things. One, it stops the function, and
it jumps to that next line, right? But two, it also determines
the residual value. So by saying return,
if we come in here, and so we do this and then we’re in
the middle of this print statement. So it sort of pauses here and then it
runs this code and then the return says, oh, this little bit that was the function,
send that back right there. So that means that this is really print
Hello Glenn, which prints out Hello Glenn. And then it goes on to the next line,
it runs greet again. Runs greet again, comes in here and so
now Hello becomes this residual value. Now it’s not very clever but
you get the idea. This residual value, it’s like
Hello Sally, so it prints out Hello Sally. So here’s a little better example
of this where we’re using both arguments and a return value. So again, this just remembers it. We’re going to say greet and
en, so en is lang. greet is going to run [NOISE] and
it runs this. Here now we’ve returned Hello,
so this Hello becomes this. So Hello is the residual value of
the function evaluation, and so out comes Hello Glenn. So now, we do this, greet es. So we’re going to call this code,
and es is going to come in as lang. And in this case,
it’s going run this and return Hola. So Hola is going to then become this
replaces, and it says Hola Sally. And so now we’re going to do it again,
greet fr, greet comes up here, we’re passing in fr as the language,
false, true, and then return. Return doesn’t come out here,
return is done. That’s it, you’re done at that point, and
you also specified the residual value of this little bit, and
that’s Bonjour Michael. By the way Glenn, Sally, and
Michael are real people. I always just use names of real
people that are actual people I know. Okay, so now what we’re going to do is
we’re going to take a look again at that max function, but we’re going to
understand how the return works. This is really more about the return. So if we take a look at max,
so we’re going to evaluate the right-hand side of this so
we have something to send into big. So max, Hello world, says take this
parameter and send it in to max. Here’s the max function, right? And so Hello world comes in
to max as some parameter. We don’t know what it’s named inside max,
we really don’t care. But, it’s going to do something, you know, read some stuff, check to
see if it’s a string or something. And then it’s going to loop
through a bunch of stuff and figure out what the largest thing is. And figure this out, read through,
pick the w as the largest one. And then it’s going to execute a return
statement because it has to pass back the w to us. Right? So, to communicate out of
the function back to the real world, here’s our real world here,
it says return ‘w’. Now it’s probably a variable,
but you get the idea. It has to run a return statement,
and that’s the end of execution. It doesn’t continue, it doesn’t even
run a single statement after return. But then it sends back to us to replace in that original statement the w
then becomes the residual value. And then the w is what goes into big. Now after a while you won’t need to look
at all of this syntax in such detail. I just want you to be able to know every
single character and what they mean. And slow this down into slow motion
because after a while you’ll just type this stuff and
you won’t even think about it. But you need to be able to slow it down
to sort of slow motion if you need to. Okay, so you can have more than one
parameter as you might well expect. This says I want two parameters. Again, the name of these things
inside here hardly matters. Just that’s the first parameter,
that’s the second parameter. In a call, we pass in 3 and 5. So that is easy, the number and order of the parameters is the same in the function
invocation as it is in the function definition. And we just add these two numbers
together, make it a local variable, and then return it. So 8 becomes what comes back and
gets stuck into x. So more than one parameter,
more than one argument, no problem. The names of the parameters inside
the functions, no big deal. So some functions do not return values. We call them non-fruitful functions, and if they return values then
we call them fruitful functions. So in summary, this was a pretty
quick introduction to functions. Like I said, I don’t really expect
you to build a bunch of functions, but I want you to understand them. And so when the time comes, and you’re thinking to yourself, oh
wow, it’s time to build a function. You’ll know how to build them and
you’ll know how to use them.

Review: Chapter 4


Assignment: Chapter 4


Graded App Item: Assignment 4.6

Code

Bonus: Chapter 4


Video: Interview: Guido van Rossum: The Early Years of Python

Summary of Python’s Origin Story:

Motivation: Guido van Rossum (GvR) wanted a better language for writing Amoeba OS utilities than C. ABC was too abstract, so GvR designed and built Python from scratch.

Creation: Initial development took 3 months with an interactive interpreter loop. GvR’s colleagues joined the project and they quickly gained traction within CWI.

Open Source Release: GvR’s manager approved an open-source release in February 1991, following the MIT license model. This was a crucial step for future growth.

Early Growth: Positive feedback from Usenet users fueled further development. The community self-organized and ported Python to various architectures and compilers.

Personal Journey: GvR spent two months at NIST in the US, leading to the first Python workshop and job offers. From 1995 to 2000, he worked at CNRI, overseeing community growth and infrastructure development.

Key Milestones:

  • First Python release: February 1991
  • First Python workshop: 1994
  • Python 1.5.2 release: 2000

Overall: GvR’s initial vision and quick execution, combined with open-source principles and a supportive community, laid the foundation for Python’s remarkable success.

Additional Notes:

  • The speaker mentions “lucky strokes” like easy management approval and helpful community contributions.
  • The historical context highlights the less homogenous Unix landscape of the early 90s.
  • This summary omits some details for brevity, but captures the essence of Python’s early beginnings.

[MUSIC] I worked at this place, CWI, and
for my then current project, which was the Amoeba operating system,
which I was working under Sape Mullender. One of our projects was to
write application-level utilities for
this new Amoeba operating system. And so, there was an operating system kernel and it was very good at
talking to the network. And it was very good at managing processes.
But there wasn’t much user-level software. There was barely a shell,
I think there was a ported, very old Unix shell something like the original
Unix version six shell, but because the file system model
on Amoeba was so very different we couldn’t take an existing
suite of Unix utilities. And so we wanted it to be self-hosting. And in order to that we realized we need
a large amount of user-level sort of applications, utilities, tools,
whatever you call it, from an editor to a mail program to
a login utility and a backup tool. And one of the things I realized,
as we had a small team of people sort of working on those things, that it was very
slow going writing all that stuff in C, and it wasn’t particularly interesting or
sort of novel or difficult and often we also didn’t
really care how fast the code ran. All the reasons why you would
write a piece of software in C didn’t really apply. The only reason left was that C
was the only language that for which we had a compiler. There was this ABC language that I had
in the back of my mind that would be a much better language to write a whole
bunch of utility application tools for Amoeba, except that ABC was so
high and abstract that it really. It wasn’t a good language
to talk to servers and file systems and
processes and it’s sort of, the whole operating system thing
was abstracted away from ABC. It was almost something
like it, I don’t know. In an alternate universe ABC could have
become the language of spreadsheets. It was very good for
talking about a user’s data. And doing all sorts of clever stuff with
that data. And it did that using very, sort of general all-purpose
data structures like lists and dictionaries and
of course it had very nice code structuring devices like a small
number of simple statements that could be combined in any way you
wanted to create other constructs. The usual function and
procedure abstractions. It was not at all an object oriented
language although the implementation had some objects sort of shining through. Anyway ABC as it existed
still wasn’t usable but I somehow, since I had worked on the ABC
project, I knew exactly how it was built. And I had this idea in my head that,
given how much time we had available for our project, I
could actually build a whole new language, design and implement it from scratch, given what I learned about both the design
and the implementation of ABC, and start using it to implement
our suite of tools and still be ahead of the game compared to
a situation where we would just have sort of clunked on writing the things
we wanted to write in C. For three months, I did my day job and at night and whenever I got
a chance I kept working on Python. I believe that within three months I was
to the point where I could tell people, look here. This is what I built. And it had an interactive
interpreter loop. So the first demos were all let’s assign an expression to
a variable and print it back. And let’s define a small function and
call it. And let’s put some things in an array and
iterate over the array. And all those things worked. And somehow, and I don’t exactly know sort
of how fast this happened, but certainly my two office mates were almost instantly taken with it and
started helping out. And they and
a few others within the institute were very excited about
this thing that I’d built. And started sort of, of course we didn’t instantly
use it on Amoeba because it wasn’t mature enough to actually write
the Amoeba utilities that we wanted. But it was already instantly useful
enough to run on our Unix system. People within CWI, even outside my
own department, started using it. And recognizing that it was fun and
productive to use. And they used it for small scripts and people started contributing
things like bug fixes. Somehow things then went very
quickly during that first year. Because I think by the end of 1990,
so a year after I started, we developed a plan to do an open
source release of this language. And this was before the word open
source had even been coined. So we didn’t call it that. But we did have some models. We had like X11,
the window system at the time, had a distribution that was one
of the sort of open source examples. With two colleagues I worked
sort of building a distribution and we, actually it turned out
to be very simple to get management to sign off on this release. That was an an incredibly lucky stroke. I just sort of, I asked my manager’s
manager what should we do about this and he said oh, you gotta talk to this and this person in the administrative
branch of the institute. And I talked to this woman and she was like in charge of all
legal affairs I believe and I said well I have written this source
code and I would like to release that and I have sort of made up a license that’s
like identical to the MIT license, I could say MIT releases software under
exactly this license and we just put like the formal name of our institute in there
instead of the regents of the institute. She asked me some questions like did
someone pay for this to be developed? And my answer was no,
I started it all on my own time and it was for this research project and
that sort of. My manager’s fine with it. And so she said sure, go ahead. And we did it and that’s so in February ’91,
we did the first Python release. It felt like, at the time
like an incredible milestone. We needed to post it to Usenet. There was this Usenet newsgroup that would receive source code for
random free projects. I got immediately started getting
useful positive feedback from, well initially just from random people
who picked up free software from Usenet. And we quickly sort of got into a routine of doing new Python releases. And every time, I mean there were the
obvious improvements to the language and the library and bug fixes, a very important category of things that
were often contributed were ports or ported fixes where people had different
architectures, different compilers. The Unix world was much less
homogenous at the time. There were lots of small Unix vendors
that had their own compilers, or their own hardware. All sorts of things. So the big things that happened during
say the first half of the ’90s was a community of Python users and
developers self-organized. Then came the invitation to come to
the United States for a couple of months from NIST, the National Institute for
Standards and Technology. So I spent two months there. We organized the first Python workshop,
which was hosted by NIST. Through that Python workshop I met
people who offered me a job and from ’95, I mean I went back to the Netherlands for
a few months and then from ’95 to 2000 I worked in US in northern
Virginia at CNRI. And so there we worked through a lot
of growth of the community and the infrastructure. We created
the Python website, I got in touch with a bunch of people who are still active in
the Python community like Barry Warsaw. I think when I started there Python
1.3 was about to be released. And then while I was
there we released several subsequent versions leading
up to 1.5.2 which for some reason 1.5.0 was nothing but
1.5.2 remained the sort of the standard, the gold standard of Python
for a very long time afterwards. [MUSIC]

Video: Office Hours: Manila Philippines

  • The content on this page is a video lecture from Charles Severance, recorded in Manila, Philippines during office hours.
  • Charles introduces some of the students in the class and they briefly share their names and greetings.
  • Charles mentions that the next office hours will be held in Paris at the end of January.

Hello, this is Charles Severence,
I’m coming to you from Manila, Philippines, at a Starbucks,
at Robinson’s Place, at office hours here on the 26th
of November, 2012, in Manila. And let’s introduce some of
the students in the class. Let me turn the light on here. Light. Light, there we go, that’s better. Okay, so just say your first name, and
let me get close so we get good audio. Say your first name and
anything else you wanna say. >> Hi I’m Charity, from the University
of the Philippines Diliman. >> Hi, I’m Jeff. Welcome to Manila, Philippines. >> I’m Doug Grant from Cebu. Thank you for the book. >> [LAUGH]

Nguyen. >> Okay. >> Iris, from University
of the Philippines, Manila. >> Hello, I’m Mervyn from UPOU. >> Hello, I’m Audrey and
representing also my husband, Fabio. >> Hi, I’m Josin. >> Okay, so there you have it. Yet another successful
Internet History Technology and Security Coursera office hours. I think the next place that we’re gonna be
meeting is Paris, at the end of January.