see.inspector module

Object inspector.

class see.inspector.DefaultArg

Bases: object

A global instance of this class is used as the default argument to see.see(). This allows for a distinction between calling see() without arguments and calling it with a falsey argument like see(None).

class see.inspector.Namespace(attrs)

Bases: object

An object whose attributes are initialised with a dictionary. Similar to the SimpleNamespace class introduced in Python 3.

see.inspector.handle_deprecated_args(tokens, args, kwargs)

Backwards compatibility with deprecated arguments pattern and r.

see.inspector.see(obj=anything)

Show the features and attributes of an object.

This function takes a single argument, obj, which can be of any type. A summary of the object is printed immediately in the Python interpreter. For example:

>>> see([])
    []            in            +             +=            *
    *=            <             <=            ==            !=
    >             >=            dir()         hash()
    help()        iter()        len()         repr()
    reversed()    str()         .append()     .clear()
    .copy()       .count()      .extend()     .index()
    .insert()     .pop()        .remove()     .reverse()
    .sort()

If this function is run without arguments, it will instead list the objects that are available in the current scope.

>>> see()
    os        random    see()     sys

The return value is an instance of SeeResult.