---
title: "python 自省(摘自 dive into python)"
author: "shrek"
date: "2009-04-21T21:44:58Z"
tags: []
slug: "python-dive-into-python"
draft: false
lastmod: "2009-04-21T21:44:58Z"
id: 372148
url: "https://shrek.iteye.com/blog/372148"
---

def info(object, spacing=10,collapse=1):
    """ print methos and doc strings.
    takes module,class,list,dictionary,or string. """

    methodList = 

    processFunc = collapse and (lambda s : "".join(s.split())) or (lambda s: s)

    print "\n".join()

if __name__ == "__main__" :
    print info(dict)