Nice solution wanted: Hide internal interfaces

Paul Rubin no.email at nospam.invalid
Mon Oct 29 18:03:49 CET 2012


Johannes Bauer <dfnsonfsduifb at gmx.de> writes:
> This makes the source files largish however (they're currently split up
> in different files). Can I use the nested class advantage and somehow
> include the inner class from another file?

You could possibly duck-punch class A:

  import B

  class A:
    ...

  A.B = B.B

Disclaimer: I haven't tested the above and I'd consider it pretty ugly.


More information about the Python-list mailing list