Ron Adam schrieb: > I think it's gets a bit awkward in some situations. > > > if bar->'__%s__' % attr < -42: print 'Hello World' > > if bar.['__%s__' % attr] > -42: print 'Hello World' > > > To me it's easier to parse the second one visually.
Ah, precedence. It definitly should be a bracketed form, or else people always wonder what the precedence is, and add parenthesis anyway just to be on the safe side. BTW, which of these would be correct (a).[b] (a.)[b] a.[(b)] a.([b]) a . [ b ] and what is the semantics of a.[42] Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com