9 ms·
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()"
by KerrickStaley 9y ago
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".
- vcavallo 9y agoAgreed. I did that as a simple way to prevent abuse. I'll have bring back special characters.
- js2 9y agoHere’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.
- amelius 9y agoThat argument would make as much sense if you replaced first by last.
- js2 9y agoOptional 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.