Importing a class without knowing the module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Meyer

    #31
    Re: Importing a class without knowing the module

    aleax@mail.comc ast.net (Alex Martelli) writes:[color=blue]
    > You did help me to better understand some of the roots of your many
    > mistaken assertions in this thread, from your first "How about adding
    > Foo.__file__" proposal onwards, yes -- thank you.[/color]

    I claim I haven't made a single mistaken assertion in this
    thread. Referencing class.__file__ instead of module.__file__ was a
    mistake, but not an assertion. In fact, when I did that, I asked the
    OP what was wrong with it.

    You have read into some of the things I've written assertions which
    simply weren't there. For instance, I said "you may not have the
    module name", which led you to ask for an example of a class without
    an __module__ attribute. I never asserted that you could get a class
    without a __module__ attribute, merely that you could get classes
    where the module name wasn't useful. if you had spent your time
    reading the text a bit more carefully, you might have saved us both
    some time.

    <mike
    --
    Mike Meyer <mwm@mired.or g> http://www.mired.org/home/mwm/
    Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

    Comment

    Working...