Closed lethosor closed 8 years ago
Why not isinstance(x, basestring)
?
Oh, that's neat. Thanks!
Not sure why it wasn't that way to begin with. :)
That's not defined in Python 3, actually.
Grr. That would explain that.
Ok, I'll fix it. One sec.
Fixed. Thanks for the patch!
We ran into this when testing pynetworktables2js -
putValue()
was failing for strings under Python 2 because they're sent across as unicode strings. I'm unsure if there's any case where byte strings would be sent across in either version, so I just changed this to check forstr
in Python 3 andunicode
in Python 2. (Using six might be cleaner for this, but I didn't feel a need to introduce another dependency for something this trivial.)