]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
added comment so that other people don't spend their time trying to optimize
authorGaëtan de Menten <gdementen@gmail.com>
Fri, 30 Oct 2009 10:28:43 +0000 (10:28 +0000)
committerGaëtan de Menten <gdementen@gmail.com>
Fri, 30 Oct 2009 10:28:43 +0000 (10:28 +0000)
optimal code

lib/sqlalchemy/dialects/sqlite/base.py

index 31f934bfeb221c9613ee3ff6d40f18dec6368489..47c797c2118f61c484eed0fbdc37831f4ff5cbfb 100644 (file)
@@ -71,6 +71,8 @@ class _DateTimeMixin(object):
 
     def _result_processor(self, fn, regexp):
         rmatch = regexp.match
+        # Even on python2.6 datetime.strptime is both slower than this code
+        # and it does not support microseconds.
         def process(value):
             if value is not None:
                 return fn(*[int(x or 0) for x in rmatch(value).groups()])