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

Optional arguments are almost always trailing arguments:

    dumps(obj)
    dump(obj, fp)
Might be implemented (in a Pythonic way) by the same function:

    fn(obj, fp=None):
        ...
Another way to think about it is that you're dumping from obj to fp. The thing I always get backwards is C's memcpy(dst, src, len) which I've always thought has its first two arguments in the wrong order.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: