Zitat von Chris Withers <chris at simplistix.co.uk>: > On 14/11/2012 21:40, Greg Ewing wrote: >> * If the compiler were allowed to recognise builtins, it could >> turn dict(a = 1, b = 2) into {'a':1, 'b':2} automatically. > > That would be my naive suggestion, I am prepared to be shot down in > flames ;-) In general, special-casing builtins in the compiler is not possible in Python. You cannot know statically that 'dict' really refers to the builtin. Something may shadow the name at run-time, making dict refer to some other callable. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4