From: Mike Bayer Date: Sat, 6 Aug 2011 19:52:50 +0000 (-0400) Subject: sigh...*NOW* fix it for py3k so the next transformer doesn't squash it X-Git-Tag: rel_0_7_3~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e57e1482a6c6e280065b929557f06fed2cd5624f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git sigh...*NOW* fix it for py3k so the next transformer doesn't squash it --- diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 82f28f8ec1..11d4cdaf60 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