From 14ea1807debf6b36ae221e2a264c1deb2a03b77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 27 Apr 2020 09:39:42 +0200 Subject: [PATCH] Small fixes --- README.md | 3 +++ index.html | 7 ++++--- ...final-01.png => descripitive_image_final-01.png} | Bin ...image_final.png => descripitive_image_final.png} | Bin 4 files changed, 7 insertions(+), 3 deletions(-) rename pdf/{descripitive image_final-01.png => descripitive_image_final-01.png} (100%) rename pdf/{descripitive image_final.png => descripitive_image_final.png} (100%) diff --git a/README.md b/README.md index 7e4bf54..29b866f 100644 --- a/README.md +++ b/README.md @@ -2140,6 +2140,9 @@ Introspection ```python = dir() # Names of object's attributes (incl. methods). = vars() # Dict of object's fields. Also .__dict__. +``` + +```python = hasattr(, '') value = getattr(, '') setattr(, '', value) diff --git a/index.html b/index.html index 240e757..4fd7c10 100644 --- a/index.html +++ b/index.html @@ -1876,12 +1876,13 @@ last_el = op.methodcaller('pop')(<l

Attributes

<list> = dir(<object>)                     # Names of object's attributes (incl. methods).
 <dict> = vars(<object>)                    # Dict of object's fields. Also <obj>.__dict__.
-<bool> = hasattr(<object>, '<attr_name>')
+
+ +
<bool> = hasattr(<object>, '<attr_name>')
 value  = getattr(<object>, '<attr_name>')
 setattr(<object>, '<attr_name>', value)
 delattr(<object>, '<attr_name>')
-
- +

Parameters

from inspect import signature
 <sig>        = signature(<function>)
 no_of_params = len(<sig>.parameters)
diff --git a/pdf/descripitive image_final-01.png b/pdf/descripitive_image_final-01.png
similarity index 100%
rename from pdf/descripitive image_final-01.png
rename to pdf/descripitive_image_final-01.png
diff --git a/pdf/descripitive image_final.png b/pdf/descripitive_image_final.png
similarity index 100%
rename from pdf/descripitive image_final.png
rename to pdf/descripitive_image_final.png