Re: [Python-3000] sys.exc_info()

2008-05-31 Thread Tim Delaney
ught in one of the enclosing frames). This reminds me of something I've thought a few times - maybe the tuple returned from sys.exc_info() should be a named tuple. Tim Delaney ___ Python-3000 mailing list Python-3000@python.org http://mail.py

Re: [Python-3000] PEP 3135 (New Super) - what to do?

2007-06-11 Thread Tim Delaney
nd makes sure the '__class__' is > available in any frame where 'super' is used. > > Code is welcome to also use __class__ directly. It is set to the class > before decoration (since this is the only way that I can figure out > how to generate the code). > >

Re: [Python-3000] [Python-Dev] PEP 367: New Super

2007-05-31 Thread Tim Delaney
ld be a syntax error (super as a keyword is only > allowed as an atom). You could get the same effect with > > A().func(1, 2, **{'super': object()}) > > but that's so obscure I don't mind. I'd prefer to eliminate it, but that's a detail that can be taken

Re: [Python-3000] [Python-Dev] PEP 367: New Super

2007-05-31 Thread Tim Delaney
sed. Did we get a decision on whether im_class should return the decorated or undecorated class, or did you want me to leave that as an open issue? I'm starting to feel somewhat embarrassed that I haven't had the time available to work solidly on this, but don't let that stop you

Re: [Python-3000] [Python-Dev] PEP 367: New Super

2007-05-27 Thread Tim Delaney
cycle. Bound methods don't come into it - it's the unbound method that's the problem. > Since class and type are synonym (as you say) having both im_class and > im_type would be a bad idea. I'm struggling to think of another, not too complicated name that conveys the sa

Re: [Python-3000] [Python-Dev] PEP 367: New Super

2007-05-26 Thread Tim Delaney
ant this attribute to represent - the class/type that this method was defined in. im_class would have also been suitable, but has had another, different meaning since 2.2. 3. im_super - property that returns the unbound super object (for an unbound method) and bound super object (for a bound met

Re: [Python-3000] [Python-Dev] PEP 367: New Super

2007-05-26 Thread Tim Delaney
which you > seem to be proposing here. Think I must have been explaining poorly - if you look at the reference implementation in the PEP, you'll see that that's exactly what's held in the 'super' free variable. I think your proposal is basically what I wa

[Python-3000] Fw: [Python-Dev] PEP 367: New Super

2007-05-25 Thread Tim Delaney
Bah - this should have gone to Pyton-3000 too, since it's discussing the PEP. Tim Delaney Tim Delaney wrote: > Guido van Rossum wrote: > >> - This seems to be written from the POV of introducing it in 2.6. >> Perhaps the PEP could be slightly simpler if it could focus jus

Re: [Python-3000] PEP 367: New Super

2007-05-20 Thread Tim Delaney
Nick Coghlan wrote: > Tim Delaney wrote: >> So the question is, should the method store the class, or the name? >> Looking up by name could pick up a totally unrelated class, but >> storing the undecorated class could miss something important in the >> decoration.

Re: [Python-3000] PEP 367: New Super

2007-05-19 Thread Tim Delaney
Tim Delaney wrote: > Phillip J. Eby wrote: >> At 05:23 PM 5/14/2007 +1000, Tim Delaney wrote: >>> Determining the class object to use >>> '''''''''''''''''''''&#x

Re: [Python-3000] PEP 367: New Super

2007-05-19 Thread Tim Delaney
Phillip J. Eby wrote: > At 05:23 PM 5/14/2007 +1000, Tim Delaney wrote: >> Determining the class object to use >> '''''''''''''''''''''''''''

[Python-3000] PEP 367: New Super

2007-05-14 Thread Tim Delaney
Here is my modified version of PEP 367. The reference implementation in it is pretty long, and should probably be split out to somewhere else (esp. since it can't fully implement the semantics). Cheers, Tim Delaney PEP: 367 Title: New Super Version: $Revision$ Last-Modified: $Date$ A

Re: [Python-3000] PEP Parade

2007-05-01 Thread Tim Delaney
the 'super' PEP to not rely on this in any way, but will add a note that your PEP (and other changes) may make the implementation simpler, and so the implementation should be revisited before 3.0. The semantics of 'super' OTOH should be fully clarified in our PEP. Tim Del

Re: [Python-3000] super() PEP

2007-04-30 Thread Tim Delaney
From: "Collin Winter" <[EMAIL PROTECTED]> > On 4/30/07, Tim Delaney <[EMAIL PROTECTED]> wrote: >> Would you prefer me to work with Calvin to get his existing PEP to match >> my >> proposal, or would you prefer a competing PEP? > > Please work to

Re: [Python-3000] super(), class decorators, and PEP 3115

2007-04-30 Thread Tim Delaney
sends my name out as - Delaney, Timothy. I'm not going to be able to submit a spearate PEP for my proposal before COB April 30th (it's already the 1st over here ...) and I have to head to work. Would you prefer me to work with Calvin to get his existing PEP to match my proposal, or woul

Re: [Python-3000] [Python-Dev] Pre-pre PEP for 'super' keyword

2007-04-30 Thread Tim Delaney
rrently, it can mean whatever you want it to. class A(object): @staticmethod def f(): print super(A) print super(A, A) Cheers, Tim Delaney ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Re: [Python-3000] [Python-Dev] Pre-pre PEP for 'super' keyword

2007-04-30 Thread Tim Delaney
f, *p, **kw): return super(*p, **kw) So, I guess my question is whether the most common case of calling the base class method with the same name is worth having some further syntactic sugar to avoid repetition? I think it is, but that would be your call Guido. Cheers, Tim Delaney

[Python-3000] Pre-pre PEP for 'super' keyword

2007-04-29 Thread Tim Delaney
er = super' line above would normally throw an UnboundLocalError, but the bytecode hacking I've done causes it to work. Comments before I start writing up the PEP? Or if anyone has a PEP partially written, do you want to incorporate any of the above into it? Tim Delaney autosuper.

Re: [Python-3000] Fixing super anyone?

2007-04-25 Thread Tim Delaney
rint 'A:', super class B(A): def f(self): def inner(): print 'B:', super super.f() inner() Should the call to inner() result in a call to A.f? Currently my bytecode version doesn't do this. I think this

Re: [Python-3000] Fixing super anyone?

2007-04-24 Thread Tim Delaney
From: "Tim Delaney" <[EMAIL PROTECTED]> > I've been off sick from work for over a week - I've been following this > discussion, but now I think I've got something which matches all the > criteria we've been discussing, so I've changed my subscri

Re: [Python-3000] Fixing super anyone?

2007-04-24 Thread Tim Delaney
super() it would be functionally identical to the following: class B(A): def f(self): super.f() This could be easily implemented by having the 'super' constructor take a 'name' parameter (which would be passed the name of current method in the setup

Re: [Python-3000] [Python-Dev] dict.items as attributes [Was: The bytes type]

2007-01-16 Thread Tim Delaney
there wouldn't be any. But the idea of a property returning an object as complex as a view still feels wrong to me. Tim Delaney ___ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: ht

Re: [Python-3000] self-contained exceptions

2007-01-09 Thread Tim Delaney
y/except/else/finally clause i.e. try: pass except AttributeError as e1: pass except NameError as e2: pass is equivalent to: try: try: pass except AttributeError, e1: pass except NameError,