Bengt Richter wrote: > On Sun, 17 Apr 2005 01:10:47 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: > [...] > > > >The "::" expression I'm proposing generalizes capturing suite bindings into an ordered sequence of (key,value) > >tuples, like an ordered vars().items() limited to the bindings produced in the suite following "::" > >Thus > > items = :: > > x = 1 > > y = [1,2] > > def foo():pass
I like this idea of "folding definitions into dicts" very much and think that it is on the ground of suite-basing. It breaks down the barrier between expressions and statements in Python without annihilating it. I think it is also wise to restrict '::' to certain accumulations. I don't like the idea of storing and dropping whole code fragments in an irresponsible manner as Brian did for trapping the compiler in his generator-to-function example of the thunks pre-PEP. I think that '::' and 'where' are true and explicit representations of the content of this proposal and be less redundant than the "as <specifier>" syntax with it's various specifiers. Introducing '::' would make the "folding definitions into dict" operation visible that takes place in the machinery of the VM. Very Pythonic IMHO :-) +1 from me for '::' and 'where'. Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list