15 Apr
2014
15 Apr
'14
3:11 a.m.
On Apr 14, 2014 4:44 PM, "Franklin? Lee" <leewangzhong+python@gmail.com> wrote: [...]
This is similar to keyword arguments, which don't have to quote their first parts. This can be generalized to dicts, to keep consistency. d = {'hello':1, 'world':2} #original d = {hello=1, world=2} #new
This not working is unexpected, if considering the expectation literals: {..} and [...] ...translate to: dict(...) and list(...) [int(..) and str(..)] Why isn't/can't this be true? I discovered this awhile back while attempting to change the default constructor with: dict = OtherDict ...equiv: module.dict = OtherDict ...and: __builtins__['dict'] = OtherDict ...but none work :-( -- C Anthony