Skip to content

Commit f056fa6

Browse files
committed
Update docs
1 parent 36f2d77 commit f056fa6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5871,6 +5871,16 @@ Frozen dictionaries
58715871
:class:`!frozendict` is not a :class:`!dict` subclass but inherits directly
58725872
from ``object``.
58735873

5874+
.. classmethod:: fromkeys(iterable, value=None, /)
5875+
5876+
Create a new frozen dictionary with keys from *iterable* and values set to
5877+
*value*.
5878+
5879+
:meth:`fromkeys` is a class method that returns a new frozen dictionary.
5880+
*value* defaults to ``None``. All of the values refer to just a single
5881+
instance, so it generally doesn't make sense for *value* to be a mutable
5882+
object such as an empty list.
5883+
58745884
.. versionadded:: next
58755885

58765886

0 commit comments

Comments
 (0)