python - List comprehension break down, deconstruction and/or disassemble -
In web2py I am trying to break the understanding of this list, so what I can do with the categories I create it. Any ideas as to break it down?
def menu_reck (return) [(x.title, none, url ('store', 'category', args = beautiful_arnal (x.id, x.slug)), Menu_reck (x.children)) or for item X []] In addition to the following which it uses:
response.menu = [(Span ('catalog', _ class = 'highlights'), false, '', menu_reck (db (db), selection.) (As_trees ())]] So far I have come with them:
def menu_rec (item): for items in x: return x.title, none, URL ('duka I have other variations in it, but every variation is different, Only gives me 1 (a) category, when all categories are given to me than the original. Can anyone see that I'm messing up on this? Any other and all help is appreciated, thanks.
Creates a list by adding an understanding of the list:
def Menu_rec (item): results = [] item x or []: url = URL ('shop', 'category', args = pretty_url (x.id, x.slug)) menu = menu_reck (x.children) # Recursive call result. You have added two local variables to break (show x.title, none, url, menu)) Show long lines to some extent , And how it will show how it automatically calls back recursively.
Your version returned directly to the for loop during the first code, and never created a list.
Comments
Post a Comment