Skip to content

Why set the default value of path_info=None while it cannot be? #740

@zhaoguixu

Description

@zhaoguixu

As stated in issue #440, #857

def test_mapadapterpath_info_is_none(self):
        m = r.Map([])
        ma = m.bind('example.org', path_info=None)
        m.match(return_rule=True)   #==========> it will crash

I just inspect the code and have a question why set the default value of path_info as None when it cannot be?

def match(self, path_info=None, method=None, return_rule=False,
                query_args=None):
        ...
def bind(self, server_name, script_name=None, subdomain=None,
             url_scheme='http', default_method='GET', path_info=None,
             query_args=None):
        ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions