My Account Log in

1 option

Implementing stateful objects or state machines in Python [electronic resource] / Jones, Brian.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Jones, Brian, author.
Beazley, David, author.
Language:
English
Physical Description:
1 online resource (20 pages)
Edition:
1st edition
Place of Publication:
O'Reilly Media, Inc., 2016.
System Details:
text file
Summary:
This lesson is a recipe from the Python Cookbook that explores the problem of wanting to implement a state machine or an object that operates in a number of different states, without littering your code with a lot of conditionals. It teaches key solutions such as encoding each operational state as a separate class and arranging for one class to delegate to another class, or directly manipulating certain attributes of instances. What you'll learn—and how you can apply it Learn how to implement a state machine or an object that operates in a number of different states, but doesn’t litter your code with a lot of conditionals. You'll also learn how to encode each operational state as a separate class and arrange for one class to delegate to the other class. Finally, see how to directly manipulate the class attribute of instances. This lesson is for you because… You're an experienced Python programmers who is looking to deepen your understanding of the language and modern programming idioms, such as the advanced techniques used by libraries, frameworks, and applications. Prerequisites Moderate experience as a Python programmer Materials or downloads needed none
Notes:
Online resource; Title from title page (viewed August 15, 2016)
ISBN:
1-4919-6528-2

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account