import parent

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Feb 27 17:10:00 EST 2007


Greg at bag.python.org, Hoover at bag.python.org writes:

> How does one get access to the class that imported a module.  For
> example: foo imports bar -- how does bar access foo?

If bar needs to know something specific from foo, then bar should
expose an interface that asks explicitly for that information, so that
foo can explicitly provide it.

-- 
 \        "Laurie got offended that I used the word 'puke.' But to me, |
  `\              that's what her dinner tasted like."  -- Jack Handey |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list