Skip to main content
Mark's user avatar
Mark's user avatar
Mark's user avatar
Mark
  • Member for 10 years, 4 months
  • Last seen more than 5 years ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
comment
Parse a list of people to determine who likes someone
In this case, yes :( I was trying to ensure that I could catch missing information
Loading…
Loading…
awarded
comment
Parse a config-file and add to command-line-arguments using argparse in Python
As you were posting your answer, I edited the question. I am now doing getattr(args, key, []).append(v) and setattr(args, key, value). But, I will change to using extend, didn't think about that :) Is using setattr and getattr better than reaching into the args and pulling out the dict? The class and function are actually part of a bigger project, this code was to test if it works. Thanks for your help