Skip to content

Instantly share code, notes, and snippets.

@matthewryanscott
Created September 23, 2008 18:17
Show Gist options
  • Save matthewryanscott/12360 to your computer and use it in GitHub Desktop.
Save matthewryanscott/12360 to your computer and use it in GitHub Desktop.
class EntityClassTransactions(NamespaceExtension):
__slots__ = NamespaceExtension.__slots__
def __init__(self, name, instance):
NamespaceExtension.__init__(self, name, instance)
d = self._d
for t_name in instance._t_selectionmethod_names:
func = getattr(instance, t_name)
name = t_name[2:]
d[name] = func
def __iter__(self):
hidden = self._i._hidden_actions
return (k for k, v in self._d.iteritems()
if (k not in hidden
and isselectionmethod(v)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment