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

This is more of a political statement than a proper library. More to demonstrate the flexibility of Python given I was able to so easily do this.



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.


I enjoy how much complete control Python enables. It’s fun to turn it into what resembles a different language.

I want to make a library where you never ever call functions with fn() notation. But just utilize accessors and absolutely bastardize dicts.



Wow, great job by this "beginner" just "learning a language"! Demonstrates knowledge of so many of Python intricacies that it's worth starting a Non-obfuscated Obfuscated Python Code Contest :)


This is horrifying and yet I can’t look away.


That is a work of art, and also you have to appreciate the author’s commitment to the bit.


I feel bad that no one seemed to get the joke. At the same time, that makes the whole thing funnier.




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

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

Search: