News for hackers. Stuff that matters.
Re:What's New in Python 3.12 by simonw on Wednesday October 18, 2023 @01:16PM (#37931691)
There are a bunch of options for getting user["email"] and user.email to do the same thing:

1. Write a class with custom __getitem__ and __getattr__ methods

2. Use a template system like Django or Jinja that implements this in certain situations

3. Use a library like https://pypi.org/project/python-box/

There are no comments on this comment yet.