Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 45 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: ####
Expand All @@ -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)
Expand Down