mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-04 06:48:27 -04:00
8fa48edbf9
(sets.Set-based collections & DB-API returns still work.)
14 lines
270 B
Python
14 lines
270 B
Python
import new
|
|
|
|
__all__ = '_function_named',
|
|
|
|
|
|
def _function_named(fn, newname):
|
|
try:
|
|
fn.__name__ = newname
|
|
except:
|
|
fn = new.function(fn.func_code, fn.func_globals, newname,
|
|
fn.func_defaults, fn.func_closure)
|
|
return fn
|
|
|