Railsbin – The vulnerable pastebin service!

User:

Title: Broken Argparse

Content:

from argparse import ArgumentParser, Namespace

# This maps --o to --of wrongly :(
args = ['--o', 'test']
parser = ArgumentParser()
parser.add_argument('--of')
namespace = Namespace()
args = parser.parse_known_args(args, namespace)
print(args)

Edit | Back