menu/lcdmenu.py
def link_menus(*menu_items):
    """
    Links a list of menu items into a loop of menu items
    :param menu_items:
    :return: the first menu item
    """
    def link(a, b):
        a[NEXT] = b
        b[PREV] = a

    prev = menu_items[-1]
    for menu_item in menu_items:
        link(prev, menu_item)
        prev = menu_item

    return menu_items[0]

    Links a list of menu items into a loop of menu items
    :param menu_items:
    :return: the first menu item
    
Links a list of menu items into a loop of menu items
Links a list of menu items into a loop of menu items
def link_menus(*menu_items):
    def link(a, b):
        a[NEXT] = b
        b[PREV] = a
    prev = menu_items[-1]
    for menu_item in menu_items:
        link(prev, menu_item)
        prev = menu_item
    return menu_items[0]
def link_menus ( * menu_items ) : def link ( a , b ) : a [ NEXT ] = b b [ PREV ] = a prev = menu_items [ - 1 ] for menu_item in menu_items : link ( prev , menu_item ) prev = menu_item return menu_items [ 0 ]
Links a list of menu items into a loop of menu items
Links a list of menu items into a loop of menu items
"""
    Links a list of menu items into a loop of menu items
    :param menu_items:
    :return: the first menu item
    """
the first menu item
the first menu item
menu_items
None