473 karma · joined June 26, 2010
http://mike.axiak.net/
http://www.github.com/axiak/
http://stackoverflow.com/users/310493/mike-axiak/
return "mailto"s + ":"s + name + "@"s + domain;
and it would compile fine. (s being a literal for std::string)As an example, a dictionary is implemented by a hash map, but after investigation, CPython may very well decide that any dictionary smaller than N is implemented as a constant table lookup. It wouldn't be renamed to TableLookupToHashMap. That would be silly.
As a (albeit poor example), I once inherited a click tracking system that uses Java Jersey. The standard response object has a .redirect(URI uri) method. Unfortunately, many "URI"s we receive from the world are not actually value, and the java URI object refuses to build URI objects from the string. Fortunately, one can simply call .setHeader(String, String) and be done with it.
Not that they haven't gotten better. My point is that CPython has a different set of goals which makes it great for a reference implementation.
Note that this is independent of CPython development.
if request.method not in ('POST', 'PUT', 'DELETE', 'PATCH'):
...
at the top of every method (or use a decorator), but it'd definitely be nice if this were part of the url dispatcher.