31. messages — Filterable Warning Messages

31.1. Functions defined in module messages

messages.getMessage(msg)[source]

Return the real message corresponding with a given mnemonic.

Parameters:

msg (str) – A short mnemonic string pointing to a message in this module.

Returns:

str – The full message matching the msg, or msg itself if no such message was defined.

Example

>>> getMessage('test_message')
'This is the warning shown to the user'
>>> getMessage('another_message')
'another_message'