@@ -132,13 +132,13 @@ class UserList(MutableSequence[_T]):
132132
133133 Class that simulates a list. The instance’s contents are kept in a regular list,
134134 which is accessible via the :attr:`~.UserList.data` attribute of UserList instances.
135- The instance’s contents are initially set to a copy of list, defaulting to the
136- empty list ``[]``.
135+ The instance’s contents are initially set to a copy of list, defaulting to the empty list ``[]``.
136+
137+ .. versionadded:: 0.10.0
137138
138139 :param initlist: Values to initialise the :class:`~domdf_python_tools.bases.UserList` with.
139140 :default initlist: ``[]``
140141
141-
142142 .. admonition:: Subclassing requirements
143143
144144 Subclasses of UserList are expected to offer a constructor which can be called with
@@ -150,8 +150,6 @@ class UserList(MutableSequence[_T]):
150150 If a derived class does not wish to comply with this requirement, all of the special
151151 methods supported by this class will need to be overridden; please consult the
152152 sources for information about the methods which need to be provided in that case.
153-
154- .. versionadded:: 0.10.0
155153 """
156154
157155 #: A real list object used to store the contents of the :class:`~domdf_python_tools.bases.UserList`.
@@ -371,11 +369,11 @@ def extend(self, other: Iterable[_T]) -> None:
371369@prettify_docstrings
372370class UserFloat (Real ):
373371 """
374- Class that simulates a float.
375-
376- :param value: Values to initialise the :class:`~domdf_python_tools.bases.UserFloat` with.
372+ Class which simulates a float.
377373
378374 .. versionadded:: 1.6.0
375+
376+ :param value: Values to initialise the :class:`~domdf_python_tools.bases.UserFloat` with.
379377 """
380378
381379 def __init__ (self , value : Union [SupportsFloat , SupportsIndex , str , bytes , bytearray ] = 0.0 ):
@@ -471,6 +469,16 @@ def __trunc__(self) -> int:
471469 return float (self ).__trunc__ ()
472470
473471 def __round__ (self , ndigits : Optional [int ] = None ) -> Union [int , float ]: # type: ignore
472+ """
473+ Round the :class:`~.UserFloat` to ``ndigits`` decimal places, defaulting to ``0``.
474+
475+ If ``ndigits`` is omitted or :py:obj:`None`, returns an :class:`int`,
476+ otherwise returns a :class:`float`.
477+ Rounds half toward even.
478+
479+ :param ndigits:
480+ """
481+
474482 return float (self ).__round__ (ndigits )
475483
476484 def __eq__ (self , other : object ) -> bool :
@@ -548,9 +556,11 @@ def __bool__(self) -> bool:
548556
549557 def __complex__ (self ) -> complex :
550558 """
551- Returrn :func:`complex(self) <complex>``.
559+ Return :class:`complex(self) <complex>`.
560+
561+ .. code-block:: python
552562
553- `` complex(self) == complex(float(self), 0)``
563+ complex(self) == complex(float(self), 0)
554564 """
555565
556566 return super ().__complex__ ()
0 commit comments