liveBook · Manning

Author

As explained in Practices of the Python Pro

Author is a book-specific Python class that stores author information and provides formatted representations of an author.

Author is a Python class that separates author information and name formatting from Book. It stores first and last names and provides display and citation representations. section 9.3.2

Extracting Author reduces Book’s responsibility while preserving its existing properties through forwarding. Book can continue accepting familiar calls while delegating formatting to the new object. section 9.3.2

Formatting Rusty Potts

An author with first name Rusty and last name Potts produces “Rusty Potts” for display and “Potts, R.” for citation. Existing Book properties forward to these Author properties.

How Practices of the Python Pro covers it

How deep it goes
Demonstrates class extraction, initialization, formatting properties, delegation, and deprecation guidance without deeper object-model internals.
Examples
Uses a Book containing Rusty Potts, display and citation formats, and a deprecated access warning.
What it assumes
Assumes basic Python classes and properties while teaching why shared author methods signal a class extraction opportunity.
What you can do after
Build it from scratch by extracting author state and behavior, then forwarding Book properties to the new Author object.
How it connects
Connects class extraction, separation of concerns, forwarding, properties, and deprecation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practices of the Python Pro. The section links point to the parts of the book it draws on.