You can try:

session.exrows = session.exrows.find(lambda r: r.id == session.exrows[
session.counter].id)

Keep in mind that will not delete the record from the database -- only from 
the Rows object itself.

Anthony

On Saturday, September 13, 2014 12:12:39 PM UTC-4, Gliese 581 g wrote:
>
> I have fetched large number of rows from a database. I am fetching the 
> rows from database and storing it in a session. Now when I delete a record 
> for some reasons I do not want to get the entire data back but just delete 
> the corresponding row from the Rows object. I have the index of deleted 
> record. I am trying to do it using following code:
>
>  *del session.exrows[session.counter]*
>
> But it says "TypeError: 'Rows' object does not support item deletion"
>
> How do I delete it from Rows object?
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to