一気にpython ABC 2
first.py
second.py
framework=Django;language=python framework=Django language=python
def show(params):
return ";".join(["%s=%s" % (k, v) for k, v in params.items()])
class First:
def show(self,params):
return "
".join(["%s=%s" % (k, v) for k, v in params.items()])
second.py
import first
conn={"language":"python","framework":"Django"};
result = first.show(conn)
print result
myfirst = first.First()
result1=myfirst.show(conn)
print result1
framework=Django;language=python framework=Django language=python