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.
I realize this is beside the point, but I'm willing to fix it myself.
It just doesn't have xmlrpc_encode_request() with the exact method signature.
P.S.: I am wondering if it is normal to have functions marked as EXPERIMENTAL with a biiiig warning sign for 11 years in the language? That really scares me. This function has been introduced in PHP 4.1.0 which was releases in 10-Dec-2001... That's just...
edit: removed rant about xmlrpc_encode_request being built-in. It's a non-default extension, apparently..
The reason the examples appear longer is because the website is documenting how to implement PHP functions in Python. Since Python is not PHP, it won't implement line-for-line replacement functions.
The examples here are kind of disingenuous to that, but if you start writing code that takes advantage of the features of Python, your lines of code should be less than PHP or equal.