Code Legions0.133 (beta)
HomeCode KingdomExercises
Sign in
Code KingdomQuestsGame modesCreateGalleryGuide

4Objects

Modelling the world as objects: classes, careful designs, families of classes, generators and decorators.

0 of 33 quests 0

You're playing as a guest: your progress won't be saved until you sign in.

Sign in Make an account

1 Classes and objects

Blueprints of your own: __init__ and self, methods, many objects, __str__, and a guild.

2 Designing classes

Classes built well: properties, guarded setters, equality and hashing, sorting, containers and composition.

3 Inheritance

Families of classes: overriding, super(), polymorphism, isinstance and duck typing.

4 Iterators and generators

One value at a time: iter and next, yield, endless generators and pipelines.

5 Decorators

Functions that wrap functions: the @ sign, caching answers, and context managers for with.