Closed tehranian closed 7 years ago
This seems to have come up a couple of times - if possible, can we add a unit or functional test for it? Let me know if you're comfortable doing that.
Hi @jtatum ,
re: .get()
and or ''
being redundant - Yea, I thought that too when I looked at the code. As described more verbosely in #138, the value under the key text
is None
so .get()
returns None
, not the fallback of empty-string. Subsequently, passing None
into the regexp matcher raises an exception.
Here's an illustrative example:
>>> d = {'text': None}
>>> repr(d.get('text', ''))
'None'
>>> repr(d.get('text', '') or '')
"''"
re: Adding tests - Sure, will do.
Hi @jtatum,
Updated PR:
text==None
.
Testing Done:
================================================= 40 passed, 1 skipped in 97.21 seconds ==================================================
Equivalent change to b6ba473eabb6f622d24cca3be19efb013dde8481, but happening in a different place. See description from #138.