August 2018
Beginner
160 pages
4h 8m
English
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Type this in your Command Prompt to create a virtualenv."
A block of code is set as follows:
# contents of test_player_mechanics.py def test_player_hit(): player = create_player() assert player.health == 100 undead = create_undead() undead.hit(player) assert player.health == 80
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
def test_empty_name(): with pytest.raises(InvalidCharacterNameError): create_character(name='', ...
Read now
Unlock full access