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

You need to allow special characters in the inability field.

My field was "Python" and my entry was "I still can't remember the argument order for json.dump()", but it gave the error "Inability Only letters, numbers and spaces allowed for inability field".



Here’s how I remember: dumps() takes no file-like argument, thus for dump() and dumps() to be consistent, the object to dump() must come first.


That argument would make as much sense if you replaced first by last.


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.


Agreed. I did that as a simple way to prevent abuse. I'll have bring back special characters.




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: