Question on Standard Types

hostmaster alpot at mylinuxsite.com
Sun Sep 7 12:23:55 EDT 2003


Hi,

I'm quite new to Python and I am reading this book called 'Core Python
Programming' by Wesley J. Chun.  I think that this is not a new book but
I believe some of the points are still valid.

There is this part in the book where it says:  

"In Python, standard types are not classes, so creating integers and
strings does not involve instantiation".

But later in the book, it talks about 'numeric objects' created when a
numeric literal is assigned to a reference.

So my question now is, if standard types are objects, shouldn't they
have classes as well ? Isn't it that a class is the blueprint of an
object? If they don't have a class to begin with, how are these objects
created?

Thanks.


Al





More information about the Python-list mailing list