4 ms·
Shouldn't the super call be: super(MyFancyRequestHandler, self).send_response(code, message=message) instead of: super(MyFancyRequestHandler, self).s
by emillon 13y ago
Shouldn't the super call be:
super(MyFancyRequestHandler, self).send_response(code, message=message)
instead of:
super(MyFancyRequestHandler, self).send_response(code, message=None)
(or even better, with args and kwargs)? Otherwise it seems that the message is discarded and None is always passed. This is one of the places where python's syntax is awful IMHO. Setting a default value shouldn't be the same as passing a parameter.
- jaytaylor 13y agoNice catch, thank you! I've updated the article and gist with your correction.
- __del__ 13y agoSpot the python3 syntax: super(ClassYouObviouslyMean, self).send_response(*a, **kw) super().send_response(*a, **kw) Spot the python3 syntax: def f(x=default_value, y=None): pass def f(x:arbitrary_object=default_value, y:this_doesnt_equal_None_y_does=None) -> more_wtf: ...