Re: [Python-3000] optional argument annotations

2006-11-27 Thread Brett Cannon
On 11/26/06, Tony Lownds <[EMAIL PROTECTED]> wrote: On Nov 26, 2006, at 1:10 PM, Brett Cannon wrote: On 11/24/06, Tony Lownds <[EMAIL PROTECTED]> wrote: > > > Obviously signature objects would grow support for annotations, but I > > still need the information to be carried on the code object t

Re: [Python-3000] Generic functions vs. OO

2006-11-27 Thread Phillip J. Eby
At 02:34 PM 11/27/2006 -0500, Jim Jewett wrote: >I'm not sure that adding it to the builtin (but in a new name) would >really buy much over an adapter (x in MyProto("asdf") ), but the >interface fans may feel differently. For what it's worth, in Chandler there is a system called Annotations that

Re: [Python-3000] Abilities / Interfaces and security

2006-11-27 Thread Tim Hochberg
Jim Jewett wrote: > On 11/22/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > >> While this is more verbose than sticking an 'if' into the original >> sendmail(), note that it can also be added by a third party, via: > >> overload smtpblib.SMTP.sendmail( >> self, from_addr, to_addrs:

Re: [Python-3000] Generic functions vs. OO

2006-11-27 Thread Jim Jewett
On 11/24/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > Thinking about my own example some more, I think it would actually > work just as well using ABCs instead of abilities. ... It seems the use > case for making abilities/interfaces separate from ABCs hinges on > the assumption that there are

Re: [Python-3000] Abilities / Interfaces and security

2006-11-27 Thread Jim Jewett
On 11/22/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > While this is more verbose than sticking an 'if' into the original > sendmail(), note that it can also be added by a third party, via: > overload smtpblib.SMTP.sendmail( > self, from_addr, to_addrs:str, msg, > mail_op

Re: [Python-3000] Abilities / Interfaces

2006-11-27 Thread Jim Jewett
On 11/22/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 11/22/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > At 09:24 AM 11/22/2006 -0800, Bill Janssen wrote: > > In Java, SMTP.sendmail would be something like this (using Python-like > > syntax 'cause my Java is rusty): > > def sendm

Re: [Python-3000] Fwd: defop ?

2006-11-27 Thread Guido van Rossum
On 11/26/06, Calvin Spealman <[EMAIL PROTECTED]> wrote: > A.b evaluates to the value of attribute 'b' of some object bound to > name 'A', of course. > A::b (or whatever syntax might be used) would evaluate to some value > that actually represents "The attribute 'b' of this object". This > "attribut

Re: [Python-3000] Special methods and interface-based type system

2006-11-27 Thread Bill Janssen
> putting methods in a module? how would that work? You'd define classes and functions intended for VM coupling in that module's namespace. They might (or might not, depending on the VM) actually be implemented by the VM, but to Python code they would appear in that namespace. Bill

Re: [Python-3000] Special methods and interface-based type system

2006-11-27 Thread George Sakkis
On 11/27/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Bill Janssen wrote: > > > Now, I don't see why the connection to the > > underlying VM implementation needs name-mangling -- it would be > > reasonable just to define a distinguished module (call it, say, for > > tradition's sake, "__VM__" :-)

Re: [Python-3000] Abilities / Interfaces

2006-11-27 Thread Jim Jewett
On 11/26/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 11/25/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > > Personally, I stand by my assessment that they can make metaclasses > > look straightforward -- but that is partly because metaclasses have > > had their roughest edges worn off already