O'Reilly logo

Python Recipes Handbook: A Problem-Solution Approach by Joey Bernard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Joey Bernard 2016

Joey Bernard, Python Recipes Handbook, 10.1007/978-1-4842-0241-8_7

7. Classes and Objects

Joey Bernard

(1)Fredericton, New Brunswick, Canada

Once you have a way of storing blocks of code into reusable functions, it is a natural progression to want to bundle multiple functions together into larger blocks of reusable code called objects. Along with this actual code, you may also want to store data in the form of properties. In order to define these new objects, you need to create classes and then instantiate them into actual objects that you can use. In this chapter, you will look at some of the most common tasks that come up when you start defining and using new objects.

7-1. Discovering the Type of an Object (Everything Is an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required