[Zope3-Users] lovely.tag behaviour
Maken Seteva
crapkonto at gmail.com
Mon Dec 24 13:20:17 EST 2007
Hi!
I am a bit curious about the behavior of the tagcount when tagging
with lovely.tag. Here is a snip from my doctest:
Nothing initially
>>> sorted(e.getCloud(users=[u'barney']))
[]
Update tags for barney
>>> e.update(1000, u'barney', [u'foo'])
>>> e.update(1000, u'barney', [u'foo', u'bar'])
Print them
>>> sorted(e.getCloud(items=(1000,), users=(u'barney',)))
[(u'bar', 1), (u'foo', 2)]
Update and print again:
>>> e.update(1000, u'barney', [u'eggs'])
>>> sorted(e.getCloud(items=(1000,), users=(u'barney',)))
[(u'eggs', 1)]
My first thing i notice is that there is no concept of 'updating' a
users tags on an object in the sense that first you add a tag then
later you add another tag with the old one being untouched (the tag
count for the old one not being incremented every time i update!). Is
there a special reason for this philosophy?
It seems like the update function is made for "tag once" kind of
behavior instead 'tag several times, on different occasions'. I could
add my own update function but I'd like to hear some opinions first.
Regards
Seteva
and marry xmas :)
More information about the Zope3-users
mailing list