[Python-ideas] Inline Functions - idea
Guido van Rossum
guido at python.org
Thu Feb 6 01:49:02 CET 2014
On Wed, Feb 5, 2014 at 4:37 PM, MRAB <python at mrabarnett.plus.com> wrote:
> On 2014-02-06 00:15, Guido van Rossum wrote:
>
>> On Wed, Feb 5, 2014 at 2:26 PM, Ethan Furman <ethan at stoneleaf.us
>> <mailto:ethan at stoneleaf.us>> wrote:
>>
>> Possibly, but it's easy enough to simulate (at least in a read-only
>> fashion) with **locals().
>>
>>
>> Eew. Use of locals() for any purpose other than debugging should be
>> discouraged.
>>
>> Even when you're using "format_map"?
>
Yes. Explicit is better than implicit. locals() is hard for the compiler to
get right -- I wouldn't be surprised if some compilers would have to
generate less optimal code if locals() is used. (Similar to
sys._getframe().)
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140205/f99d521a/attachment-0001.html>
More information about the Python-ideas
mailing list