Package pology :: Module message :: Class MessageUnsafe

Class MessageUnsafe

  object --+    
           |    
Message_base --+
               |
              MessageUnsafe

The lightweight class for catalog entries, for read-only applications.

Unlike the Message, this class does nothing special with attributes. The interface attributes are implemented as in Message_base, where the starred lists are standard lists, starred sets standard sets, etc. There is no assignment and type checking, nor modification monitoring. You should use this class when messages are not expected to be modified, for the performance benefit.

The top modification counter still exists, but only as an ordinary inactive attribute, which the client code can manually increase to signal that the message has changed. This may be necessary for some client code, which relies on top counter to function properly.


See Also: Message_base

Instance Methods
 
__init__(self, init={})
Initializes the message elements by the values in the dictionary.

Inherited from Message_base: __eq__, __getattr__, __ne__, __setattr__, clear, get, set, set_fmt, set_inv, set_key, state, to_lines, to_string, unfuzzy

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __str__, __subclasshook__

Instance Variables

Inherited from Message_base: active, auto_comment, flag, fmt, format, fuzzy, inv, key, key_previous, manual_comment, msgctxt, msgctxt_previous, msgid, msgid_plural, msgid_plural_previous, msgid_previous, msgstr, obsolete, refentry, refline, source, translated, trn, untranslated

Properties

Inherited from object: __class__

Method Details

__init__(self, init={})
(Constructor)

 

Initializes the message elements by the values in the dictionary.

The dictionary keys are like the names of attributes in the interface, and not all must be supplied. Those left out will be initialized to appropriate null values.

Parameters:
  • init (dict) - dictionary of initial values
Overrides: object.__init__