On Nov 18, 5:59 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> No need to excuse. I think Ruby provides a nice context for discussing
> the semantics of top level "open classes". But I think those are
> entirely different than your contextual bindings. Note I find your
> proposal somewhat confusing
On 19 Nov., 00:02, MonkeeSage <[EMAIL PROTECTED]> wrote:
> Ps. Just for kicks, here is a simple ruby 1.8 mock-up of the proposal
> (sorry for using ruby, but I don't know enough C to start hacking the
> CPython backend; I think that a higher-level example is conceptually
> clearer anyhow).
No need
Ps. Just for kicks, here is a simple ruby 1.8 mock-up of the proposal
(sorry for using ruby, but I don't know enough C to start hacking the
CPython backend; I think that a higher-level example is conceptually
clearer anyhow). Reference cycles are not detected in the example.
#!/usr/bin/ruby
class
On Nov 18, 5:27 am, James Stroud <[EMAIL PROTECTED]> wrote:
> It would be unoriginal of me to suggest that this violates the explicit
> is better than implicit maxim. But it does.
That's what I meant about hiding the complexity of an attribute
failure. Though, sometimes implicit is acceptable (e.
On Nov 18, 4:07 am, MonkeeSage <[EMAIL PROTECTED]> wrote:
> Proposal:
>
> When an attribute lookup fails for an object, check the top-level
> (and local scope?) for a corresponding function or attribute and apply
> it as the called attribute if found, drop through to the exception
> otherwise. Th
MonkeeSage wrote:
> Proposal:
>
> When an attribute lookup fails for an object, check the top-level
> (and local scope?) for a corresponding function or attribute and apply
> it as the called attribute if found, drop through to the exception
> otherwise. This is just syntactic sugar.
>
>
> Exa
Proposal:
When an attribute lookup fails for an object, check the top-level
(and local scope?) for a corresponding function or attribute and apply
it as the called attribute if found, drop through to the exception
otherwise. This is just syntactic sugar.
Example:
a = [1,2,3]
a.len()
#