diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 19:06:47 -0500 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 19:06:47 -0500 |
commit | 648778afb2d8c3314dbad83438954d69dfa48b7b (patch) | |
tree | aa42ab66439cf7f226c2afccde30fbc0f51f25c7 /lib/sqlalchemy/processors.py | |
parent | 80ece085260ecef3f0cb623e8873e3aec0b2a231 (diff) | |
download | sqlalchemy-648778afb2d8c3314dbad83438954d69dfa48b7b.tar.gz |
just a pep8 pass of lib/sqlalchemy/
Diffstat (limited to 'lib/sqlalchemy/processors.py')
-rw-r--r-- | lib/sqlalchemy/processors.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/processors.py b/lib/sqlalchemy/processors.py index ddca43a6c..ddea44dab 100644 --- a/lib/sqlalchemy/processors.py +++ b/lib/sqlalchemy/processors.py @@ -16,11 +16,13 @@ import codecs import re import datetime + def str_to_datetime_processor_factory(regexp, type_): rmatch = regexp.match # Even on python2.6 datetime.strptime is both slower than this code # and it does not support microseconds. has_named_groups = bool(regexp.groupindex) + def process(value): if value is None: return None @@ -42,12 +44,14 @@ def str_to_datetime_processor_factory(regexp, type_): return type_(*map(int, m.groups(0))) return process + def boolean_to_int(value): if value is None: return None else: return int(value) + def py_fallback(): def to_unicode_processor_factory(encoding, errors=None): decoder = codecs.getdecoder(encoding) @@ -125,4 +129,3 @@ try: except ImportError: globals().update(py_fallback()) - |