Hi,
I started to play with events to port a library to sqla 0.7. I managed to
use
the 'listen' function but I failed on 'remove'. Looking at the signatures
they seem to be just the same, but here is what I get:
In [7]: event.listen(obj.__class__.title, 'set', listen_cb)
In [8]: event.remove(obj.__class__.title, 'set', listen_cb)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/misc/src/hg/py/sqlkit-pub/demo/sql/demo.py in <module>()
----> 1
2
3
4
5
/misc/src/sqlalchemy/sqlalchemy/lib/sqlalchemy/event.pyc in remove(target,
identifie
69 """
70 for evt_cls in _registrars[identifier]:
---> 71 for tgt in evt_cls._accept_with(target):
72 tgt.dispatch._remove(identifier, tgt, fn, *args, **kw)
73 return
TypeError: 'InstrumentedAttribute' object is not iterable
Did I misundertand the syntax or what else?
TIA
sandro
*:-)
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/SqqNPsbu8DsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.