Language question
Brian Kelley
kelley at bioreason.com
Tue Oct 19 17:52:38 EDT 1999
This question actually comes up due to accident (bug?) Here is the
scenario
class foo:
"""insert foo here"""
def bar(foo):
"""this should really be class bar(foo): Insert bar here"""
As far as python is concerned, this is prefectly legal except that the
user of bar will probably get None for their troubles. That is foobar =
bar() is the same thing as foobar = None.
My question is, is there any real reason to allow this? I.e. something
cool and clever that I am not seeing? Can I exploit this feature for
nefarious deeds? Inquiring minds want to know.
--
Brian Kelley w 505 995-8188
Bioreason, Inc f 505 995-8186
309 Johnson Av
Santa Fe, NM 87501 kelley at bioreason.com
More information about the Python-list
mailing list