************************************ :mod:`family` --- MediaWiki families ************************************ .. automodule:: family :synopsis: Objects representing MediaWiki families :exclude-members: Family .. autoclass:: Family .. method:: __post_init__() :classmethod: Post-init processing for Family class. The allocator will call this class method after the Family class was created and no :meth:`__init__()` method is used and ``__post_init__()`` is defined in your Family subclass. This can be used for example to expand Family attribute lists. .. warning:: The ``__post_init__()`` classmethod cannot be inherited from a superclass. The current family file class is considered only. .. caution:: Never modify the current attributes directly; always use a copy. Otherwise the base class is modified which leads to unwanted side-effects. **Example:** .. code-block:: Python @classmethod def __post_init__(cls): """Add 'yue' code alias.""" aliases = cls.code_aliases.copy() aliases['yue'] = 'zh-yue' cls.code_aliases = aliases .. version-added:: 8.3 .. method:: nicepath(code) Return nice path prefix, e.g. `'/wiki/'`. .. version-deprecated:: 2.0 Use :meth:`APISite.articlepath` instead. .. version-removed:: 5.4 :param str code: The site code :rtype: str