Size: 1151
Comment:
|
Size: 1150
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
= 12. SOAP Web 服务 == | = 12. SOAP Web 服务 = |
Include(../xbar) 以下是 Dip 原版的勘误。勘误表中指出的错误在 svn 版中均已修正。
12. SOAP Web 服务
12.6 以 WSDL 进行 SOAP 内省
例 12.8:注意第二行多了一个右括号。
>>> from SOAPpy import WSDL >>> wsdlFile = 'http://www.xmethods.net/sd/2001/TemperatureService.wsdl') >>> server = WSDL.Proxy(wsdlFile) >>> server.methods.keys() [u'getTemp']
16. 函数编程
16.3 重识列表过滤
例16.7, (1):odd uses the built-in mod function "%" to return True if n is odd and False if n is even.BR odd 使用内建的取模(mod)函数 "%" 对于为奇数的 n 返回 True;为偶数的返回 False。BR
odd 使用内建的取模(mod)函数 "%" 对于为奇数的 n 返回 1;为偶数的返回 0。BR
1 和 0 被 typo 为 True 和 False 是有原因的,你可以在修订历史里面找到。Mark 在 Dip 的早期版本中(那时 Python 还没有独立的 bool 类型)把 True, False 与 1, 0 都混用了,后来可能是用了盲目替换,自己都被弄懵了。