zzzeek / test_sqlalchemy

0 stars 0 forks source link

sql.func leading/trailing underscore confusion #996

Closed sqlalchemy-bot closed 16 years ago

sqlalchemy-bot commented 16 years ago

Issue created by Anonymous


function names beginning with underscore are truncated. I think r2218 got confused somewhere.

--- lib/sqlalchemy/sql/expression.py    (revision 4337)
+++ lib/sqlalchemy/sql/expression.py    (working copy)
@@ -777,7 +777,7 @@
             except KeyError:
                 raise AttributeError(name)

-        elif name.startswith('_'):
+        elif name.endswith('_'):
             name = name[0:-1](0:-1)
         f = _FunctionGenerator(**self.opts)
         f.__names = list(self.__names) + [name](name)
sqlalchemy-bot commented 16 years ago

Michael Bayer (zzzeek) wrote:


weeeirrd. added a test for the fix in fc2cf22038e575670ee2edc890f8dfbc07d9bfa7, thanks for the spot.

sqlalchemy-bot commented 16 years ago

Changes by Michael Bayer (zzzeek): set state to "resolved"