Skip to content

Commit af34ba0

Browse files
committed
Preserve indentation in the frozendict documentation
Use one multiline doc attribute so per-attribute trimming retains CPython public documentation indentation. Assisted-by: OpenAI Codex:model identifier unavailable
1 parent cf04eb9 commit af34ba0

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎crates/vm/src/builtins/frozendict.rs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ use crate::{
2626
};
2727
use rustpython_common::atomic::{Ordering, PyAtomic, Radium};
2828

29-
/// frozendict() -> new empty immutable dictionary
30-
/// frozendict(mapping) -> new immutable dictionary initialized from a mapping
31-
/// object's (key, value) pairs
32-
/// frozendict(iterable) -> new immutable dictionary initialized as if via:
33-
/// d = {}
34-
/// for k, v in iterable:
35-
/// d[k] = v
36-
/// d = frozendict(d)
37-
/// frozendict(**kwargs) -> new immutable dictionary initialized with the name=value
38-
/// pairs in the keyword argument list. For example: frozendict(one=1, two=2)
29+
#[doc = r"frozendict() -> new empty immutable dictionary
30+
frozendict(mapping) -> new immutable dictionary initialized from a mapping
31+
object's (key, value) pairs
32+
frozendict(iterable) -> new immutable dictionary initialized as if via:
33+
d = {}
34+
for k, v in iterable:
35+
d[k] = v
36+
d = frozendict(d)
37+
frozendict(**kwargs) -> new immutable dictionary initialized with the name=value
38+
pairs in the keyword argument list. For example: frozendict(one=1, two=2)"]
3939
#[pyclass(module = false, name = "frozendict", traverse = "manual")]
4040
#[derive(Debug)]
4141
pub struct PyFrozenDict {

0 commit comments

Comments
 (0)