October 2018
Beginner to intermediate
736 pages
17h 39m
English
The preceding code reorganization gives us a solid, logical place to create the new Abstract Base Class (ABC) that we mentioned earlier. The goal of this new ABC is to require derived classes to be able to provide a message-data-ready data structure that can be passed to DaemonMessage as the data argument in its __init__ method, both streamlining the process of creating a message for any given object that needs one, and allowing the code for that process to exist as part of the individual data object classes themselves. In keeping with the naming convention that's evolved in the code so far, this would probably be best written as an instance method named to_message_data. Another option considered was