Phillip J. Eby wrote:
> At 10:17 PM 12/3/2007 -0700, Neil Toronto wrote:
>> Interesting. But I'm going to have to say it probably wouldn't work as
>> well, since C code can and does alter tp_dict directly. Those places in
>> the core would have to be altered to invalidate the cache.
>
> Eh? Where
Phillip J. Eby wrote:
> At 03:51 PM 12/3/2007 -0800, Guido van Rossum wrote:
>> On Dec 3, 2007 3:48 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
>> > Actually, you're missing the part where such evil code *can't* muck
>> > things up for class dictionaries. Type dicts aren't reachable via
>> > ord
At 10:17 PM 12/3/2007 -0700, Neil Toronto wrote:
>Phillip J. Eby wrote:
> > Actually, you're missing the part where such evil code *can't* muck
> > things up for class dictionaries. Type dicts aren't reachable via
> > ordinary Python code; you *have* to modify them via setattr. (The
> > __dict__
I apologize - I had forgotten what you were telling me by the time I
replied. Here's a better answer.
> Phillip J. Eby wrote:
>> At 03:26 PM 12/3/2007 -0700, Neil Toronto wrote:
>> Actually, you're missing the part where such evil code *can't* muck
>> things up for class dictionaries. Type dict
At 03:51 PM 12/3/2007 -0800, Guido van Rossum wrote:
>On Dec 3, 2007 3:48 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> > Actually, you're missing the part where such evil code *can't* muck
> > things up for class dictionaries. Type dicts aren't reachable via
> > ordinary Python code; you *have*
Phillip J. Eby wrote:
> At 03:26 PM 12/3/2007 -0700, Neil Toronto wrote:
>> Phillip J. Eby wrote:
>> > At 12:27 PM 12/3/2007 -0700, Neil Toronto wrote:
>> Some version of the non-string keys problem would exist with any caching
>> mechanism, though. An evil rich compare can always monkey about with
On Dec 3, 2007 3:48 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> Actually, you're missing the part where such evil code *can't* muck
> things up for class dictionaries. Type dicts aren't reachable via
> ordinary Python code; you *have* to modify them via setattr. (The
> __dict__ of types retur
At 03:26 PM 12/3/2007 -0700, Neil Toronto wrote:
>Phillip J. Eby wrote:
> > At 12:27 PM 12/3/2007 -0700, Neil Toronto wrote:
> >> Guido van Rossum wrote:
> >> > How about subclasses of str? These have all the same issues...
> >>
> >> Yeah. I ended up having it, per class, permanently revert to unca
Phillip J. Eby wrote:
> At 12:27 PM 12/3/2007 -0700, Neil Toronto wrote:
>> Guido van Rossum wrote:
>> > How about subclasses of str? These have all the same issues...
>>
>> Yeah. I ended up having it, per class, permanently revert to uncached
>> lookups when it detects that a class dict in the MRO
At 12:27 PM 12/3/2007 -0700, Neil Toronto wrote:
>Guido van Rossum wrote:
> > On Dec 2, 2007 12:49 PM, Neil Toronto <[EMAIL PROTECTED]> wrote:
> >> It turned out not *that* hard to code around for attribute caching, and
> >> the extra cruft only gets invoked on a cache miss. The biggest problem
> >
Guido van Rossum wrote:
> On Dec 2, 2007 12:49 PM, Neil Toronto <[EMAIL PROTECTED]> wrote:
>> It turned out not *that* hard to code around for attribute caching, and
>> the extra cruft only gets invoked on a cache miss. The biggest problem
>> isn't speed - it's that it's possible (though extremely
On Dec 2, 2007 12:49 PM, Neil Toronto <[EMAIL PROTECTED]> wrote:
> It turned out not *that* hard to code around for attribute caching, and
> the extra cruft only gets invoked on a cache miss. The biggest problem
> isn't speed - it's that it's possible (though extremely unlikely), while
> testing ke
On Dec 2, 2007 6:28 PM, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> I don't see a problem with requiring dictionary key comparisons to be
> side-effect-free - even in the general case of dictionaries, not just
> namespace ones.
Me neither -- but the problem is enforcement.
--
--Guido van Rossum
Thanks, Audun. If you look at the code, you'll see that both a
connect method and a do_handshake method already exist, and work
pretty much as you describe. The issue is what to do when the user
doesn't use them -- specifies do_handshake_on_connect=True.
> Another way of doing it could be to exp
Guido van Rossum wrote:
> On Dec 2, 2007 7:40 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote:
>> Just for the record, I also like the idea of __builtins__ being a magic
>> alias for the boringly-but-practically named builtins module.
>
> [Imagine me jumping up and down and screaming at the top of my l
15 matches
Mail list logo