Documentation[créer] [purger]
function Outils.extractArgsGreedy( frame )
    if type( frame.getParent ) == 'function' then
        local args = {}
        for k, v in pairs( frame.args ) do
            args[ k ] = v;
        end
        for k, v in pairs( frame:getParent().args ) do
            args[ k ] = v;
        end
        return args
    else
        return frame
    end
end

function Outils.extractArgsLazy( frame )
    if type( frame.getParent ) ~= 'function' then
        return frame
    end

    local directArgs = frame.args
    local parentArgs = frame:getParent().args
    local nilArgs = {}

    local args = {}

    setmetatable( args, {
        __index = function ( t, key )
            if nilArgs[ key ] then
                return nil
            end

            local directArg = directArgs[ key ]
            if directArg ~= nil then
                t[ key ] = directArg
                return directArg
            end

            local parentArg = parentArgs[ key ]
            if parentArg ~= nil then
                t[ key ] = parentArg
                return parentArg
            end

            nilArgs[ key ] = true
            return nil
        end
    } )

    return args
end