4 ms·
>If it was a dict, it would be recordByID. Never have I ever encountered any codebase where dictionaries were so named.
by vsnf 3y ago
>If it was a dict, it would be recordByID.
Never have I ever encountered any codebase where dictionaries were so named.
- paganel 3y agoI usually add a “_dict” to the variable name.
- psd1 3y agoI follow that convention. I've written many functions that accept a list of values and, typically as intermediate processing, build a dict from them. Many rest APIs I've coded for require me to fetch from two endpoints to build my output, and this pattern saves iterating over lists.