Skip to main content
Source Link
tallseth
  • 3.7k
  • 1
  • 26
  • 24

It doesn't work in generality. Not all valid dict keys make addressable attributes ("the key"). So, you'll need to be careful.

Python objects are all basically dictionaries. So I doubt there is much performance or other penalty.