question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should arrow.get(None) work?

See original GitHub issue

As per the title should the following work?

>>> arrow.get(None)
<Arrow [2020-12-20T20:12:12.631217+00:00]>

https://github.com/arrow-py/arrow/blob/master/arrow/factory.py#L169

There could be an issue where someone unintentionally passes None in but gets no error. Realistically is this used?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
krisfremencommented, Dec 26, 2020

I would agree toward it not working.

Everything that in theory isn’t an actual string or object that can be parsed into an Arrow, should raise an exception at least.

0reactions
jadchaarcommented, Dec 28, 2020

Go for it @Armaxxx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrow: Better dates & times for Python — Arrow 1.2.3 ...
Arrow is a Python library that offers a sensible and human-friendly approach to creating, manipulating, formatting and converting dates, times and timestamps. ...
Read more >
Parse date and time from string with time zone using Arrow
In arrow doc i see that the constructor works like : "class arrow.arrow.Arrow(year, month, day, hour=0, minute=0, second=0, microsecond=0, ...
Read more >
Accurate handling of parsing errors · Issue #91 · arrow-py/arrow
In my opinion arrow.get should work as momentjs 's moment() function and strictly parse ISO-8601-formatted date (in addition to parsing timestamp, ...
Read more >
What I Learned at Work this Week: Python Arrow Library (and ...
Arrow can work with various data types (date, time, datetime, tzinfo, ... Get handles the error by returning None, so we don't have...
Read more >
Arrow function expressions - JavaScript - MDN Web Docs
Arrow function expressions should only be used for non-method functions because they do not have their own this .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found