Tim Peters wrote:
> Note that there are already three PEPs related to speeding dict-based
> namespace access; start with:
>
> http://www.python.org/dev/peps/pep-0280/
>
> which references the other two.
>
> The "normal path" through dict lookups got faster since there was a
> rash of those,
Alex Martelli wrote:
>
> On Aug 23, 2006, at 2:22 PM, K.S.Sreeram wrote:
>
>> Hi all,
>>
>> I noticed in Python/ceval.c that LOAD_GLOBAL uses a dictionary lookup,
>> and was wondering if that can be optimized to a simple array lookup.
>>
>> If i'
Hi all,
I noticed in Python/ceval.c that LOAD_GLOBAL uses a dictionary lookup,
and was wondering if that can be optimized to a simple array lookup.
If i'm right there are 3 kinds of name lookups: locals, outer
scopes(closures), and globals. (not counting attribute lookup). Locals
are identified b
Fredrik Lundh wrote:
> given that java has beaten us with some 60 bytes:
> and in order to further improve Python's Kolmogorov rating:
> how about adding Peter Norvig's constraint-based solver to the Python library:
lol!
(just waiting for somebody to give a serious explanation on why this is
a bad
Talin wrote:
> def x():
>scope = object()
>scope.x = 1
>def y():
> scope.x = 2
'object' doesn't let you set custom attributes.
Here's what I normally use in my code...
class Data : pass
def x() :
d = Data()
d.x = 1
def y() :
d.x += 1
Re
Guido van Rossum wrote:
> I think we need a PEP for const/static/only/cached/precomputed or
> whatever people like to call it.
fredrik's got a micro pep at http://online.effbot.org
> Once we have (say) static, I think making the case expressions static
> by default would still cover all useful ca