Hi. It seems that cProfile does not support throwing exceptions into
generators properly, when an external timer routine is used.
The problem is that _lsprof.c: ptrace_enter_call assumes that there
are no exceptions set when it is called, which is not true when the
generator frame is being gen_sen
Hi.
I was surprised to find in my profiling that instance variable access
was pretty slow.
I looked through the CPython code involved, and discovered something
that really surprises me.
Python, probably through the valid assumption that most attribute
lookups go to the class, tries to look for t
I was just looking through the code that handles frames (as part of my
current effort to determine how to improve on CPython's performance),
when I noticed the freelist/zombie mechanism for frame allocation
handling.
While the zombie mechanism seems like a nice optimization, I believe
there can be
Kevin
>
>
>
> On 6/9/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> >
> > At 12:23 AM 6/10/2007 +0300, Eyal Lotem wrote:
> > >A. It will break code that uses instance.__dict__['var'] directly,
> > >when 'var' exists as a property wit
On 6/10/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 12:23 AM 6/10/2007 +0300, Eyal Lotem wrote:
> >A. It will break code that uses instance.__dict__['var'] directly,
> >when 'var' exists as a property with a __set__ in the class. I believe
> >
The freelist currently serves as a good optimization of a special case
of a recurring recursion. If the same code object (or one of the same
size) is used for recursive calls repeatedly, the freelist will
realloc-to-same-size (which probably has no serious cost) and thus the
cost of allocating/dea
On 6/10/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > Note that _only_ recursions will have more than 1 frame attached.
>
> That's not true; in the presence of threads, the same method
> may also be invoked more than one time simultaneously.
Yes, I have missed that, and realized that I miss
My question is specifically regarding the transition back from
lookdict_string (the initial value) to the general lookdict.
Currently, when a string-only dict is trying to look up any
non-string, it reverts back to a general lookdict.
Wouldn't it be better (especially in the more important case o
On 6/11/07, Carl Friedrich Bolz <[EMAIL PROTECTED]> wrote:
> Eyal Lotem wrote:
> > My question is specifically regarding the transition back from
> > lookdict_string (the initial value) to the general lookdict.
> >
> > Currently, when a string-only dict is trying
I see why a cycle that has multiple objects with a __del__ method is a problem.
Once you call __del__ on one of the objects, its no longer usable by
the others, and its not clear which order is correct.
My question regards the case where a cycle of objects only has 1
object which has a __del__.
On Sun, Jun 29, 2008 at 9:00 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
>> As I explained above, it *is* part of a cycle: """including
>> the class objects themselves: class->dict->function->func_globals""".
>
> Ah, right. I must have missed that explanation.
>
>> I know. I assumed Python doe
I would like to experiment with security based on Python references as
security capabilities.
Unfortunatly, there are several problems that make Python references
invalid as capabilities:
* There is no way to create secure proxies because there are no
private attributes.
* Lots of Python objects
It may be really hard to get it right, unless we are overlooking some simple solution.I disagree that we should "just use OS protections".The
reason I am interested in Pythonic protection is because it is so much
more powerful than OS protections. The capability model is
much more powerful than th
I would like to re-suggest a suggestion I have made in the past, but
with a mild difference, and a narrower scope.
Name: Attribute access for all namespaces
Rationale: globals() access is conceptually the same as setting the
module's attributes but uses a different idiom (access of the dict
direc
Why not lazily import modules by importing them when they are needed
(i.e inside functions), and not in the top-level module scope?
On 10/13/05, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 04:02 PM 10/13/2005 +0100, Michael Hudson wrote:
> >Greg Ewing <[EMAIL PROTECTED]> writes:
> >
> > > Phil
I have a few claims, some unrelated, and some built on top of each
other. I would like to hear your responses as to which are
convincing, which arne't, and why. I think that if these claims are
true, Python 3000 should change quite a bit.
A. Metaclass code is black magic and few understand how it
On 11/5/05, Alex Martelli <[EMAIL PROTECTED]> wrote:
> On 11/4/05, Eyal Lotem <[EMAIL PROTECTED]> wrote:
> > I have a few claims, some unrelated, and some built on top of each
> > other. I would like to hear your responses as to which are
> > convincing, which
17 matches
Mail list logo