Why we will use obj$func() often
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Apr 28 02:14:09 EDT 2004
Mark Hahn wrote:
> What do you mean by keyword? Which do you mean?
>
> 1) outer x # x is declared to come from outer scope
>
> 2) outer.x # outer is prefix replacing &
>
> Form 1 is very non-P*thonic. I was happy to get rid of the global keyword
> and I'd hate to see this one show up.
I was thinking of it as a direct replacement for &,
so that instead of
&x = y + &z
you'd write
outer x = y + outer z
But if you don't like the look of that, there's
nothing more to be said.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list