一口气python ABC2
first.py
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
Python代码
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
补充:Web开发 , Python ,