-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python/knowpro] Change class structure to suit Python's type system …
…better (#803) (This is only for the Python port.) Change TMeta into a base class. We then get: - IMessage has IKnowledgeSource as a base class, and no longer has a metadata field -- you just call message.get_knowledge(). - IConversation is generic in the message type (TMessage) and its messages field is a list of TMessage. - add_metadata_to_index() is generic in the message type (I think there's a pattern here :-). - PodcastMessageMeta becomes base class PodcastMessageBase (but it could easily be just blended into PodcastMessage). - PodcastMessage derives both from PodcastMessageBase and IMessage. - Podcast derives from IConversation[PodcastMessage] and its messages field is a list of PodcastMessage. - assign_message() takes a sequence of PodcastMessage.
- Loading branch information
1 parent
c685f0c
commit 15dbaca
Showing
3 changed files
with
23 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters