this one works perfectly and is even better in my opinion as it
suppress the need of import the delete module, and, still in my
opinion, it is better to use the remove method provided by sqlalchemy
than delete thing, it didn't came to my mind because i thought james
had a good reason to use delete instead of remove, (i can't see which
one...)

i'll submit an errata anyway

Thank you again!

On 9 nov, 15:54, Marius Gedminas <mar...@gedmin.as> wrote:
> On Tue, Nov 09, 2010 at 05:17:17AM -0800, Yohann REBATTU wrote:
> > Hello,
>
> > Thank you,
> > your answer is really clear and does make sense for me!
>
> > but unfortunatly it does not fix the problem, using list(), I get an
> > index out of range error in __delitem__ function.
>
> D'oh.  I should've learned not to post late at night, when half of my
> brain is not working.  Of course the indexes will shift if you remove
> something.  How about this instead:
>
>     def update_tags(self, id=None):
>         ...
>         for tag in list(page.tags):
>             if tag.id not in self.form_result['tags']:
>                 page.tags.remove(tag)
>         ...
>
> ?
>
> Marius Gedminas
> --
> Never trust an operating system you don't have sources for.
>
>  signature.asc
> < 1 000AfficherTélécharger

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to