Bugs item #1690840, was opened at 2007-03-29 19:14 Message generated for change (Comment added) made by ghazel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Greg Hazel (ghazel) Assigned to: Nobody/Anonymous (nobody) Summary: xmlrpclib methods submit call on __str__, __repr__ Initial Comment: Notice how trying to print a method causes it to submit the call: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import ServerProxy >>> s = ServerProxy("http://google.com") >>> print s.somecall Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__ return self.__send(self.__name, args) File "c:\python25\lib\xmlrpclib.py", line 1437, in __request verbose=self.__verbose File "c:\python25\lib\xmlrpclib.py", line 1191, in request headers xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented Similarly: >>> f = s.somecall >>> locals() {'f': Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__ return self.__send(self.__name, args) File "c:\python25\lib\xmlrpclib.py", line 1437, in __request verbose=self.__verbose File "c:\python25\lib\xmlrpclib.py", line 1191, in request headers xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented> ---------------------------------------------------------------------- >Comment By: Greg Hazel (ghazel) Date: 2007-04-04 06:45 Message: Logged In: YES user_id=731668 Originator: YES This would be reasonable: >>> from xmlrpclib import ServerProxy >>> s = ServerProxy("http://google.com") >>> print s.somecall <xmlrpclib._Method object at 0x00C08470> Similarly: >>> f = s.somecall >>> locals() {'f': <xmlrpclib._Method object at 0x00BA8030>, '__builtins__': <module '__built in__' (built-in)>, 's': <ServerProxy for google.com/RPC2>, '__name__': '__main__ ', 'ServerProxy': <class xmlrpclib.ServerProxy at 0x00C61AE0>, '__doc__': None} Bonus points for: <xmlrpclib _Method somecall of <ServerProxy for google.com/RPC2>> ---------------------------------------------------------------------- Comment By: Collin Winter (collinwinter) Date: 2007-03-30 02:59 Message: Logged In: YES user_id=1344176 Originator: NO What would you rather seem them print? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com