diff options
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r-- | lib/sqlalchemy/util/langhelpers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 82f28f8ec..11d4cdaf6 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -616,14 +616,15 @@ def counter(): lock = threading.Lock() counter = itertools.count(1L) - def next(): + # avoid the 2to3 "next" transformation... + def _next(): lock.acquire() try: return counter.next() finally: lock.release() - return next + return _next def duck_type_collection(specimen, default=None): """Given an instance or class, guess if it is or is acting as one of |