3 ms·
What happens if the dictionary has the keys 'John Doe' and 'John_Doe'? Can you use 'self' as a key? Ive used a class to provide this kind of dot notation fere
by simonh 10y ago
What happens if the dictionary has the keys 'John Doe' and 'John_Doe'?
Can you use 'self' as a key?
Ive used a class to provide this kind of dot notation fererencing of hierarchical data. If you could enclose the keys in quotes I might feel better about it but that's probably not possible.
- joshuamorton 10y ago>Can you use 'self' as a key? Without looking at the code: yes. `self` in python is just convention.