"What is the name of the function/method that called me?"

Juergen A. Erhard jae at ilk.de
Fri Oct 22 11:13:05 EDT 1999


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Moshe" == Moshe Zadka <moshez at math.huji.ac.il> writes:

    Moshe> [Posted and CCed to author]
    Moshe> On 17 Oct 1999, Cameron Laird wrote:

    >> Is there a profound and/or interesting
    >> reason Python doesn't provide the kinds
    >> of introspective features we're discus-
    >> sing here (a traceback, for example)
    >> without the detour through the land of
    >> exception-tossing?

    Moshe> Yes. It is a reminder that IT SHOULDN'T BE DONE (sorry for
    Moshe> shouting).  Introspecting into "static" stuff (like
    Moshe> classes, methods, etc.) is /moderately/ ok (though it is
    Moshe> usually more a sign the design was wrong).

I strongly disagree here.  Introspection is surely not as evil as you
make it to be.  Objective-C, for example, has complete introspection
into the static side of things...

And "(though it is usually more a sign the design was wrong)" smacks
of quite a bit of arrogance on your part... just because you can't
think of a reason to use it doesn't mean it's wrong.  (Sorry for
getting personal... but it should be made clear that your comment is
*your* opinion only).

    Moshe> However, introspecting into /dynamic/ data should be
    Moshe> available (because the debugger needs it) but obscure
    Moshe> (because anyone doing this for the runtime of his program
    Moshe> is commiting a shooting offense). If someone needs this
    Moshe> information to debug his program, they should use the
    Moshe> debugger.

I also disagree, though not as strongly as above.  But again, just
because you don't see a need for this doesn't mean it can't be used in
a meaningful way.

My EUR 0.0.2 (heck, where's the euro-sign when you need one (and the
creation of a special symbol for that one *is* a shooting offence ;-))

Bye, J

- -- 
Jürgen A. Erhard      eMail: jae at ilk.de      phone: (GERMANY) 0721 27326
         My WebHome: http://members.tripod.com/~Juergen_Erhard
        GIMP - Image Manipulation Program (http://www.gimp.org)
    Codito, ergo sum - "I code, therefore I am" -- raster at redhat.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjgQfv8ACgkQN0B+CS56qs0mWQCgg4yPnOI4sJIlsBMEigLuePw9
vaAAoIB/hP7Uw3pIse3xwrc4sTbAKVve
=bnA9
-----END PGP SIGNATURE-----




More information about the Python-list mailing list