Re:Python alternatives for PHP functions
by Firehed on Tuesday December 25, 2012 @01:40PM
(#4966683)
It IS a PHP library - just one written in C rather than in user-land PHP code. Why is this a problem? The XML-RPC extension isn't even enabled by default.
xmlrpc_encode_request on this site should probably be fixed to use xmlrpclib.dumps (or loads if you need the other direction). This has existed in Python since version 2.2.
I realize this is beside the point, but I'm willing to fix it myself.
You think PHP is short because you have functions like xmlrpc_encode_request and the equivalent in Python is 20 lines. What you don't see if that xmlrpc_encode_request is pages and pages of C code and PHP macro's behind the scenes. That function should be in a library, not in a programming language, which is why PHP is more comparable to other web frameworks, not to other programming languages.