Why does vars(response) not show response.text? (using Python Requests module)
Question: 
    import requests
    response = requests.get('http://httpbin.org/get')
    print vars(response) # no response.text listed
    print response.text # value printed
    

Why does `vars(response)` not list `response.text` when that value exists?

`dir(response)` does list `response.text`, but that does not print the value
of it.


Answer: For the first question, the reason `text` doesn't show up in `vars` is
[because it's a
property](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L741)
(defined by `@property`) as opposed to a class attribute (which is what ends
up in `__dict__` shown by `vars`).

For the second question, this is because the way `dir` and `vars` work.

From the documentation for `vars`:

> vars([object])
>
> Return the **dict** attribute for a module, class, instance, or any other
> object with a **dict** attribute.
>
> Objects such as modules and instances have an updateable **dict** attribute;
> however, other objects may have write restrictions on their **dict**
> attributes (for example, new-style classes use a dictproxy to prevent direct
> dictionary updates).
>
> Without an argument, vars() acts like locals(). Note, the locals dictionary
> is only useful for reads since updates to the locals dictionary are ignored.

And for `dir`:

> The default dir() mechanism behaves differently with different types of
> objects, as it attempts to produce the most relevant, rather than complete,
> information:
>
> If the object is a module object, the list contains the names of the
> module’s attributes. If the object is a type or class object, the list
> contains the names of its attributes, and recursively of the attributes of
> its bases. Otherwise, the list contains the object’s attributes’ names, the
> names of its class’s attributes, and recursively of the attributes of its
> class’s base classes.

So basically `dir` just prints out the attributes of the passed in argument,
_not_ its corresponding value.

Also, [this answer](http://stackoverflow.com/a/981624/193906) is pretty
comprehensive in explaining the differences.

