Index Ai Academy
Glossary · Phase 0 · Tools

Class attribute

Also written: class attributes

A value written in a class's body, outside any method, and shared by every object of that class.

Try it now

Creating the Rental runs Rental's __init__, which calls Product's __init__ through super(). Watch two frames for the same object, one stacked on the other.

Learn it properly

Inheritance and class attributes · Build classes on other classes, and share values across every object. About 35 minutes.

Start this free lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write