Fredrik Lundh wrote:
Calvin Spealman wrote:e
attribute access (foo.bar) binds more tightly than subscripting
(foo[bar]).
no, they have the same binding power; here's the relevant part of the
grammar:
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
note however that "."
Carl Banks wrote:
http://docs.python.org/ref/summary.html
I think the summary is correct (am not going to bother to double-
check), but there's a subtle point you're missing. Here is a
simplified explanation.
the rendered summary is broken; see my other post.
--
http://mail.python.org/ma
Calvin Spealman wrote:e
attribute access (foo.bar) binds more tightly than subscripting (foo[bar]).
no, they have the same binding power; here's the relevant part of the
grammar:
trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
note however that "." only binds to a name, n
On Aug 14, 7:17 pm, Michael Tobis <[EMAIL PROTECTED]> wrote:
> On Aug 14, 6:01 pm, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
>
>
>
> > attribute access (foo.bar) binds more tightly than subscripting (foo[bar]).
>
> That certainly looks right, and in retrospect I wonder that I even
> doubted it.
Michael Tobis wrote:
On Aug 14, 6:01 pm, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
attribute access (foo.bar) binds more tightly than subscripting (foo[bar]).
That certainly looks right, and in retrospect I wonder that I even
doubted it. But even the official docs seem to me to specify
o
On Aug 14, 6:01 pm, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
>
> attribute access (foo.bar) binds more tightly than subscripting (foo[bar]).
That certainly looks right, and in retrospect I wonder that I even
doubted it. But even the official docs seem to me to specify
otherwise:
http://docs.
On Thu, Aug 14, 2008 at 6:46 PM, Michael Tobis <[EMAIL PROTECTED]> wrote:
> I wrote some code to test the precedence of getitem vs getattr; it
> shows that getitem binds tighter.
>
> I have been handed some code that relies on the observed behavior.
> However, the Nutshell precedence list claims th
I wrote some code to test the precedence of getitem vs getattr; it
shows that getitem binds tighter.
I have been handed some code that relies on the observed behavior.
However, the Nutshell precedence list claims the opposite. Is the
Nutshell wrong or am I missing something or is this a bug?
clas