Browse Source

Introspection

pull/10/head
Jure Šorn 5 years ago
parent
commit
201f9aa803
1 changed files with 6 additions and 5 deletions
  1. 11
      README.md

11
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}

Loading…
Cancel
Save