

def list_tables(self):
    body = self.body
    limit = body.get('Limit')
    if body.get('ExclusiveStartTableName'):
        last = body.get('ExclusiveStartTableName')
        start = (list(dynamodb_backend.tables.keys()).index(last) + 1)
    else:
        start = 0
    all_tables = list(dynamodb_backend.tables.keys())
    if limit:
        tables = all_tables[start:(start + limit)]
    else:
        tables = all_tables[start:]
    response = {
        'TableNames': tables,
    }
    if (limit and (len(all_tables) > (start + limit))):
        response['LastEvaluatedTableName'] = tables[(- 1)]
    return dynamo_json_dump(response)

dataset/ETHPy150Open spulec/moto/moto/dynamodb/responses.py DynamoHandler.list_tables/original