Closed PFython closed 4 years ago
No is the short answer.
before you think of changing the language semantics - think about the principle 'Explicit is better than implicit' - if you try to override '{}' or hide to avoid having to type 'OrderedDict' - you will end up making your code far more difficult to read for others - of for yourself 6 months down the line. Just type 'OrderedDict' - it is understood, and does what you want - more typing, but improved readability. – Tony Suffolk
Is it possible/desirable to override curly brackets e.g.
from cleverdict import CleverDict x = {"a": "First letter"}
... would result in x being a CleverDict object not a regular dict?