Guido wrote: [xmlrpclib creates attributes on demand] > Hm. I didn't know xmlrpc did that, and I think it's pretty unique in > this respect. I've seen other RPC code do this. Some soaplib? objects used to infinitely recurse, if you repred, them due to a subtle __getattr__ bug. > It looks like a hack, and one that can only work as > long as attributes on xmlrpc instances are always supposed to be > methods. I imagine that we are talking about xmlrpclib.Server. This class creates callable objects, representing remote method calls, when attributes are requested. This allows for a pretty natural method call syntax e.g. server = xmlrpclib.Server('http://...') server.do_something_remote() server.do_something_else() XML-RPC does not have an attribute concept. > Why didn't you choose to special-case xmlrpc? It appears > that introspecting an xmlrpc instance is hopeless anyway... > (Depending on what you need the introspection for, of course. You > haven't told us the whole story.) It's not necessarily hopeless but getting a list of available methods (and therefore attribute that should be offered) costs a round-trip and isn't supported by all XML-RPC servers (like Python's SimpleXMLRPCServer, for example). Cheers, Brian
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4