From b4dc9b07c70c16848960da077fc7ac18fe5e9bc8 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 27 Dec 2021 10:15:13 +0100 Subject: [PATCH] Better 2.7 example --- docs/examples.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index 1ef1a4ba4..ba5343d4a 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -476,7 +476,7 @@ Types .. doctest:: - >>> from attrs import attrib, fields + >>> from attrs import fields >>> @define ... class C: @@ -484,9 +484,10 @@ Types >>> fields(C).x.type - >>> @define - ... class C: - ... x = attrib(type=int) + >>> import attr + >>> @attr.s + ... class C(object): + ... x = attr.ib(type=int) >>> fields(C).x.type