Skip to content

Conversation

@jcupitt
Copy link

@jcupitt jcupitt commented May 8, 2019

It was testing for "stringiness" with isinstance(str), but this only
works with py3.

Instead, test for "functionness" with callable(x). This was deprecated
in py3.1, but has been undeprecated for py3.2+, so it's safer and
simpler.

https://bugs.python.org/issue10518

It was testing for "stringiness" with `isinstance(str)`, but this only
works with py3.

Instead, test for "functionness" with `callable(x)`. This was deprecated
in py3.1, but has been undeprecated for py3.2+, so it's safer and
simpler.

https://bugs.python.org/issue10518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant