Ivan Voras <[EMAIL PROTECTED]> writes: > I know it can be almost always done by using a temporary variable: > > tmp = some.big.structure.or.nested.objects.element > tmp.member1 = something > tmp.member2 = something > > but this looks ugly to me.)
To me, it looks explicit. Python programmers value explicit code. In other words, this looks like the right way to do it. The alternative you're looking for would be to make an implicit reference, which would make the code harder to follow. Note that in the specific case of an attribute of a module, the first lone of the above example can be rewritten as:: from some.big.package.or.nested.module import element as tmp which is at least as common as the assignment example above. -- \ "The only tyrant I accept in this world is the still voice | `\ within." -- Mahatma Gandhi | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list