Python does as below. SELECT does otherwise. I was curious as to why.

In [1]: foo = ['bar', 'baz', 'bazzle']


In [2]: def func(str):
   ...:     return 'fu{}'.format(str)
   ...: 


In [3]: map (func, foo)
Out[3]: ['fubar', 'fubaz', 'fubazzle']


In [4]: def printem(lis):
   ...:     for l in lis:
   ...:         print l
   ...:         


In [5]: printem(map(func, foo))
fubar
fubaz
fubazzle




On Wednesday, September 10, 2014 5:01:49 AM UTC-4, Leonel Câmara wrote:
>
> You need to argument expand (using *) the result of the map  in the first 
> case.
>
> myselect = SELECT(
>             OPTION('Choose'),
>             *map(make_option, rows
>             _id='container_selector',
>             _name='container_selector',
>             )
>

-- 
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