News for hackers. Stuff that matters.
Re:Box: Python dictionaries with recursive dot notation access by user5994461 on Friday May 05, 2017 @04:08PM (#14276457)
> One of the best things about Python is being able to use virtually anything as a key.

I find that to be the thing one of the worst thing ever made into a programming language.

You are facing a program/API/library and you can have absolutely no clue of what it will give or expect without extensive reverse engineering.

Re:Box: Python dictionaries with recursive dot notation access by dragonwriter on Friday May 05, 2017 @07:10PM (#14277503)
> You are facing a program/API/library and you can have absolutely no clue of what it will give or expect without extensive reverse engineering.

Or reading the docs.

Re:Box: Python dictionaries with recursive dot notation access by xapata on Friday May 05, 2017 @07:07PM (#14277492)
I find that's more a problem of bad design and bad names, rather than flexible types.
Re:Box: Python dictionaries with recursive dot notation access by aidos on Friday May 05, 2017 @09:13PM (#14278076)
Wait, you choose what to put in the dict. I like being able to map from, say, db objects to internal representations. Why wouldn't you want that?!
Re:Box: Python dictionaries with recursive dot notation access by dllthomas on Friday May 05, 2017 @10:54PM (#14278428)
The concern is facing something that expects a map, and not knowing how to correctly populate it.
Re:Box: Python dictionaries with recursive dot notation access by aidos on Saturday May 06, 2017 @06:00AM (#14279556)
Time has taught me to prefer lists / flat structures as arguments to functions (and in most other storage and transfer contexts). Besides, either you're passing in entities that conform to the api, or you're not. Nothing about arbitrary keys in dicts changes that.