Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I liked everything about it until I saw the API for the Python client. What a catastrophe.

I pray Microsoft is looking for Python developers: https://gist.github.com/whalesalad/2142f0075c6896f4547c



Wow, the function naming alone is terrible.

    for i in range(len(path_parts) - 1, -1, -1):
        if not path_parts[i] in resource_types and path_parts[i] in resource_tokens:
            return resource_tokens[path_parts[i]]
This bit of iteration is painful to look at as well.


Some optimisations to get it to web-scale on TempleOS were obviously necessary.



I didn't compare the code, but maybe it's autogenerated from a more C-like language, making a bit awkward syntax for a language like Python?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: