All right. Let's create our first class object,
and I promise you, this is going to be super, super easy.
We're not going to do anything fancy.
We're going to start from the very basics.
So when we create a class, we use the keyword 'class', and
then we give it a name such as 'MyClass', and then a ':',
and we indent, and anything that's indented under this section
here that has this hidden sort of space here, this invisible
space rather, when it's indented, that means it's part of this class.
Now, all I'm going to do is type the word 'pass',
and I'm actually going to show you why we need to do that.
'unexpected end of file
while parsing'. Didn't understand that there was supposed to
be something here, or in this case, nothing.
So Python says, "Okay, you need to have that indenting".
And 'pass' is a keyword that allows us to basically say, "Hey,
there's nothing in here.
But keep this".
So let's go ahead and run that,
and let's instantiate our new class.
So let's call this 'new_class',
and you'll notice I'm using camel casing here where every
letter of every word starts with an uppercase and
everything else is lowercase.
And in a variable, I'm using what's called snake casing,
where everything is lowercase,
and instead of using spaces or upper case letters like we
use here, we just use an underscore.
So 'new_class = MyClass', and we are going to use
parentheses around that.
And this just tells Python to instantiate this,
so to actually run this class for us, and that's what it's
going to do. It's going to set it up for us.
And then if we run, 'type(new_class)', '__main__', which we'll talk
about down the road, '.MyClass'.
And that's basically saying that we have a new object here.
So if we did 'type(str)', we're going to see that's not going to work.
,If we did 'type("str")'. There we go,
that's a better example.
We can see that is a 'str'.
And if we print it, 'print(type("str"))', we can see it's
a 'class' called 'str'. It's a string.
Ours is a class called 'MyClass'.
So what I would like you to do for this video, if you're
brand new to Object Oriented Programming, just create a very
simple instance of an object here.
Use 'class MyClass'.
Don't put anything in it.
Just put 'pass', and then instantiate it.
That's all you need to do to get started with Object Oriented
Programming.