Il giorno giovedì 20 aprile 2017 16:31:31 UTC+2, Andrea Fae' ha scritto:
>
> Hello, if I have to get the list from database, where I need to put the
> code? At the start of default.py where I use the functions? Thanks
>
> Il giorno mercoledì 19 aprile 2017 17:30:06 UTC+2, Anthony ha scritto:
>>
Hello, if I have to get the list from database, where I need to put the
code? At the start of default.py where I use the functions? Thanks
Il giorno mercoledì 19 aprile 2017 17:30:06 UTC+2, Anthony ha scritto:
>
> First, when using auth.requires(), it is best to put the test inside a
> lambda (o
On Thursday, April 20, 2017 at 8:36:46 AM UTC-4, Andrea Fae' wrote:
>
> But... "any"? I need some more information about lambda I thinkwhere
> to find this syntax with any?
> where is written what you told about evaluation?
>
Remember, web2py is a Python framework -- many of the things you se
Thanks
Il giorno giovedì 20 aprile 2017 15:40:33 UTC+2, Marvix ha scritto:
>
> https://docs.python.org/2/library/functions.html#any
>
> def any(iterable):
> for element in iterable:
> if element:
> return True
> return False
>
> so any() return true if one (or more) of
https://docs.python.org/2/library/functions.html#any
def any(iterable):
for element in iterable:
if element:
return True
return False
so any() return true if one (or more) of the elements is True.
this:
auth.has_membership(role) for role in list_of_roles
try all th
But... "any"? I need some more information about lambda I thinkwhere to
find this syntax with any?
where is written what you told about evaluation?
Thank you very much
Il giorno mercoledì 19 aprile 2017 17:30:06 UTC+2, Anthony ha scritto:
>
> First, when using auth.requires(), it is best to p
First, when using auth.requires(), it is best to put the test inside a
lambda (or standard function) so it will not be evaluated until the
decorated function is actually called (otherwise, the test will be
evaluated whenever the controller file is accessed).
Anyway, you can do something like th
7 matches
Mail list logo