polydojo / dotsi

Dot-accessible, update-aware Python dicts (& lists). Works recursively, like a charm.
MIT License
31 stars 3 forks source link

how do i access objects named with specail characters #5

Open mwoolweaver opened 3 months ago

mwoolweaver commented 3 months ago

I am creating a dict from some imported json that contains the following

{ram: {'total': 3880192, 'free': 1158636, 'used': 491812, 'available': 3176752, '%used': 12.674939796793561}}

when trying to get the %used data it fails with a syntax error.

if i had control of the names i would change them but...

i will do math to get the answer for now with no issues