It is more pythonic and slightly faster.
$ python Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import timeit >>> timeit.timeit("d = {}") 0.023977567000656563 >>> timeit.timeit("d = dict()") 0.050307012000303075 >>> >>> import dis >>> def f(): return {} >>> def g(): return dict() >>> dis.dis(f) 1 0 BUILD_MAP 0 2 RETURN_VALUE >>> dis.dis(g) 1 0 LOAD_GLOBAL 0 (dict) 2 CALL_FUNCTION 0 4 RETURN_VALUE
Depends D13636