Nobody is answering your question, so I'll take a crack at it.  Mind you, 
I'm not a contrib or anything, just an enthusiastic user so caveat emptor...

Rows objects are just a form of BasicStorage object, which makes accessing 
dictionary items easier with the attribute ("dot") syntax.  I've "smuggled" 
(love the metaphor) data items into rows many times.  Like, when I'm 
processing some of the fields into new values and I want to pass them along 
with the original data for display later.

But know that this is not a strictly supported use of Row.  It has a lot of 
magic that it can do, such as "delete_record" and "update_record", as well 
as the useful filtering and combining of Row objects via Rows containers. 
 Realize that some of this magic may break if you add your own stuff to the 
Row and then expect it to behave normally.

Another possibility is to create your own Storage object.  You can 
initialize a Storage object directly from a dictionary just by 
foo=Storage(mydict).  I recommend you spend some time in the web2py source 
code -- there is SO MUCH hidden in there that you will find it a constant 
source of amazement.  Get a IDE such as Wing or others -- it makes it easy 
to delve into the source of web2py because you can go straight to a class.

On Wednesday, September 7, 2016 at 2:55:31 PM UTC-7, Antonio Salazar wrote:

> I have a function that returns several rows object, and each row needs a 
> small list with valid workflow transitions.
>
> I feel the workflow transitions belong in a separate variable, but I tried 
> adding it to each row, and it works and doesn't appear to interfere with 
> database operations.
> Am I at risk of breaking something by adding elements to a row 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