Learn Enum in Object-oriented Python

preview_player
Показать описание
Python allows you to start coding out your logic simply and then incrementally add more complexity. Here's a demonstration of how to start out with a simple class and then add getters and setters when you need to validate parameters in the class constructor.
I'll also show you how to use Enum, which is new in Python 3.4.

For reference to the code, please see the following post:
Рекомендации по теме
Комментарии
Автор

This is a really nice example. Thanks! It is hard to find this sort of middle-complexity stuff. It is surprisingly difficult to find examples where the properties of a class are constrained to particular values in python.

bradleyfallon
Автор

I'd say this is rather an (nice) example for OOP in Python than focusing the usage of Enums.

GergiH
Автор

Hey Warren! Thanks for making this video.

henokadem
Автор

Thank you, absolutely perfect tutorial

dylan
Автор

nice but you didn't real show where you use enum

Intellectual_House
Автор

Am I the only one who thinks "oo, nice voice, man"?

annayundina
Автор

bro its pronounced 'sewt' not 'sweet'

XwitterEye