diff --git a/README.md b/README.md index e9f553e..e799e4a 100644 --- a/README.md +++ b/README.md @@ -630,31 +630,19 @@ Introspection and Metaprograming ```python >>> class B: ... def __init__(self): -... self.a= 'sdfsd' -... self.b = 123324 +... self.a = 'abcde' +... self.b = 12345 >>> b = B() ``` -### Getattr +### Getattr, Hasattr, Setattr ```python ->>> getattr(b, 'a') -'sdfsd' -``` - -#### Is the same as: +>>> getattr(b, 'a') # Same as B.__getattribute__(b, 'a') +'abcde' -```python -B.__getattribute__(b, 'a') -``` - -### Hasattr -```python >>> hasattr(b, 'c') False -``` -### Setattr -```python >>> setattr(b, 'c', 10) ```