Hacker News new | past | comments | ask | show | jobs | submit login

Could have been even easier: `argparse.Namespace` already has `__contains__()` ツ

That said, https://pypi.org/project/addict/ has been around a long time...




That contains doesn’t permit the behavior, though. It would give you an AttributeError if you attempted this.

Yes, addict seems to be exactly what I was going for.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: