Skip to content
Snippets Groups Projects
Unverified Commit ce813599 authored by Gavin M. Roy's avatar Gavin M. Roy Committed by GitHub
Browse files

Merge pull request #27 from dave-shawley/python3-bool

Implement Results.__bool__ method.
parents 7b3d14f9 b4e63bd2
No related branches found
No related tags found
No related merge requests found
Version History
===============
- Next Release
- Implement ``Results.__bool__`` to be explicit about Python 3 support.
- 1.10.3 2017-11-01
- Remove the functionality from ``TornadoSession.validate`` and make it raise a ``DeprecationWarning``
- Catch the ``KeyError`` raised when ``PoolManager.clean()`` is invoked for a pool that doesn't exist
Loading
Loading
Loading
Loading
@@ -59,6 +59,9 @@ class Results(object):
def __nonzero__(self):
return bool(self.cursor.rowcount)
 
def __bool__(self):
return self.__nonzero__()
def __repr__(self):
return '<queries.%s rows=%s>' % (self.__class__.__name__, len(self))
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment