Jeremy> I meant to say "I wonder if Python should provide a generic Jeremy> string-to-number conversion routine that returns either an int Jeremy> or a long." SM> The XML-RPC spec also indicates that the <int> tag is restricted to SM> the value that can be represented by a four-byte signed integer. Jeremy> It sounds like such a function would not be particularly useful Jeremy> for XML-RPC, but I can imagine it would be useful in a world Jeremy> where programmers don't worry about whether they have an int or Jeremy> a long. Ah, okay. I was only looking at your note through XML-RPC-colored glasses. I thought PEP 237 was supposed to handle the int/long unification. Presumably, after it is fully in effect, int("9999999999999999999999999") will just return a long, maybe not. Jeremy> Incidentally, it looks like the XML-RPC code won't work with Jeremy> subclasses of built-in types. It's does dispatch on the type() Jeremy> of the object, but a subclass of string won't have type Jeremy> StringType. It seems to me, though, that it should be Jeremy> marshallable using XML-RPC. I filed a bug report just so this thought wouldn't get lost: http://sourceforge.net/tracker/index.php?func=detail&aid=469972&group_id=5470&atid=105470 I don't know if that's a bug report or a feature request though. Xmlrpclib doesn't currently marshal instances of classic classes, so I'm not so sure it should marshal instances of new-style classes either. It's Fredrik's and Martin's call. Skip
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