Re: [Python-3000] [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Ben . Young
[EMAIL PROTECTED] wrote on 11/07/2006 15:46:44: > outbound x = 1 > x = 2 > > evaluating using Jeremy Hilton's' list: > > 1. is a real word > 2. For me - in python - it would mean: Is found in 'outer' scope and > is already bound. > And the literal meaning of 'outbound 'headed away' [1] is pre

[Python-3000] Fw: Fw: typeclasses, duck-typing

2006-05-12 Thread Ben . Young
I've now had time to have a play with this, and I've developed the following implementation. It uses Guido's overloading module from his blog. It's quite similar to your proposal, but not as short as it uses current python abilities. There's a little demo at the bottom. Cheers, Ben from ov

Re: [Python-3000] Fw: typeclasses, duck-typing

2006-05-12 Thread Ben . Young
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote on 11/05/2006 17:18:39: > At 04:27 PM 5/11/2006 +0100, [EMAIL PROTECTED] wrote: > >Why not > > > >class Foo(object): > > @specialize(arg(0)) > > def core.len(self) > > ... > > Where does 'core' come from? What is speciali

Re: [Python-3000] Fw: typeclasses, duck-typing

2006-05-11 Thread Ben . Young
"Phillip J. Eby" <[EMAIL PROTECTED]> wrote on 11/05/2006 16:09:47: > At 10:12 AM 5/11/2006 +0100, [EMAIL PROTECTED] wrote: > >A dynamic version of concepts (I guess a combo of multi-methods and > >adaptation) would be great for Python, but it's hard to see how it could > >be done simply and effic

Re: [Python-3000] Fw: typeclasses, duck-typing

2006-05-11 Thread Ben . Young
[EMAIL PROTECTED] wrote on 10/05/2006 17:39:57: > At 11:21 AM 5/10/2006 +0100, [EMAIL PROTECTED] wrote: > >Have you taken a look at ConceptGCC? ( > >http://www.osl.iu.edu/~dgregor/ConceptGCC/) > > > >It's basically a first cut at implementing the Concepts which will be > >availiable in the next v

[Python-3000] Fw: typeclasses, duck-typing

2006-05-10 Thread Ben . Young
[EMAIL PROTECTED] wrote on 09/05/2006 18:25:29: > On Tuesday 09 May 2006 13:10, Antoine Pitrou wrote: > > Interestingly, there was a GNU addition to C++ named "signatures" which > > achieved roughly the same thing: some kind of compile-time duck-typing. > > > > http://gcc.gnu.org/onlinedocs

Re: [Python-3000] [Python-Dev] Class decorators

2006-03-30 Thread Ben . Young
[EMAIL PROTECTED] wrote on 30/03/2006 13:01:25: > [EMAIL PROTECTED] wrote: > > [EMAIL PROTECTED] wrote on > > 30/03/2006 11:38:30: > > > >> Jack Diederich wrote: > >> > >> > Classes have a unique property in that they are the easiest way to > > make > >> > little namespaces in python. > >> >