From a74c8576192ef26d2bed250ca0b05205d4d2049d Mon Sep 17 00:00:00 2001 From: divinity76 Date: Thu, 12 May 2022 10:16:01 +0200 Subject: [PATCH] fix TabErrors in sample code the sample code contained 3x TabError's where spaces were mixed with tabs causing errors like File "C:\cygwin64\home\hans\tibia\pybot\test.py", line 25 self.no = None TabError: inconsistent use of tabs and spaces in indentation --- README.md | 83 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 930d9a2..5b38592 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,23 @@ --- - - + + **var\_dump** is a PHP's `var_dump()` equivalent function for python. It displays structured information such as type, value etc of a python `object`, `list`, `tuple`, `dict` & other types. ### Installation ### ----------- -using `pip` - - pip install var_dump - -Or - -clone the project & cd into the `python-var_dump` directory -then run: - - python setup.py install +---------- +using `pip` + + pip install var_dump + +Or + +clone the project & cd into the `python-var_dump` directory +then run: + + python setup.py install ### Examples ### ---- #### Example #1: #### @@ -45,34 +45,41 @@ you can pass more than one argument: #2 NoneType(None) #3 bool(False) -#### Example #3: #### +#### Example #3: #### - from var_dump import var_dump +```python +from var_dump import var_dump - class Base(object): - - def __init__(self): - self.baseProp = (33, 44) - self.fl = 44.33 - class Bar(object): - - def __init__(self): - self.barProp = "I'm from Bar class" - self.boo = True - - - class Foo(Base): - - def __init__(self): - super(Foo, self).__init__() - self.someList = ['foo', 'goo'] - self.someTuple = (33, (23, 44), 55) - self.anOb = Bar() - self.no = None - - foo = Foo() - var_dump(foo) +class Base(object): + + def __init__(self): + self.baseProp = (33, 44) + self.fl = 44.33 + + +class Bar(object): + + def __init__(self): + self.barProp = "I'm from Bar class" + self.boo = True + + +class Foo(Base): + + def __init__(self): + super(Foo, self).__init__() + self.someList = ['foo', 'goo'] + self.someTuple = (33, (23, 44), 55) + self.anOb = Bar() + self.no = None + + +foo = Foo() +# var_dump(foo) +print(foo) + +``` #### Output #### #0 object(Foo) (6)