-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dateutil.parse.parse() rejects bytearray as input #417
Comments
dateutil.parse.parse()
rejects bytearray
as input
A one line change to
instead of
However, letting duck typing work would be even better:
|
I wouldn't say that support for Given that we're already calling If you (or anyone coming across this issue) would like to make a PR, I'd go with the duck typed version, plus add a test where a |
The duck typing solution is in PR #418, along with two tests. Thanks for the quick reply. |
Any function which can operate on a
bytes
ought to be able to operate on abytearray
---unless something has specifically been done to prevent that, as indateutil.parser.parse()
. Whenbytes
works, it's unexpected thatbytearray
would fail. It would be better to acceptbytearray
s as well.The text was updated successfully, but these errors were encountered: