From 201f9aa8034d10eb96c2b492bb5e861d80cd8f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 28 Jan 2019 19:33:57 +0100 Subject: [PATCH] Introspection --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 44e7c78..93ee1f0 100644 --- a/README.md +++ b/README.md @@ -1182,14 +1182,15 @@ Introspection and Metaprograming ### Attributes ```python ->>> class Z: -... def __init__(self): -... self.a = 'abcde' -... self.b = 12345 ->>> z = Z() +class Z: + def __init__(self): + self.a = 'abcde' + self.b = 12345 ``` ```python +>>> z = Z() + >>> vars(z) {'a': 'abcde', 'b': 12345}