Is this type of forward referencing possible?
andrew at acooke.org
Sun Mar 15 16:46:54 CET 2009
Paul McGuire wrote:
> On Mar 15, 6:33 am, "andrew cooke" <and... at acooke.org> wrote:
>> someone else has answered this, but an extra trick that is sometimes
>> useful is that while there is no forward referencing you can often
>> exploit late binding and evaluation order.
> Not the same. The OP wanted someType to be a class-level attribute,
> not an instance level one.
i know. as i said, it is an additional trick that is sometimes useful
when you have forwards references. it's particularly useful with module
dependencies, which have the same limitation (you can import "after the
def" and so avoid circularities).
my apologies if you think my answers should be more focussed. i am trying
to teach a man to fish.
More information about the Python-list