Bug or feature?
Radovan Garabik
spam at melkor.dnp.fmph.uniba.sk
Sat Sep 1 15:21:15 EDT 2001
Gerson Kurz <gerson.kurz at t-online.de> wrote:
: Consider:
: class a:
: def b(self,x):
: print "call #1"
: def b(self,x):
: print "call #2"
: v = a()
: v.b(42)
: This code raises no warning, and can be executed ('call #2' will be
: printed), on Python 2.1.1 (ActivePython Build 212). Bug or feature?
probably feature.
It allows you to redefine the function (method) later if needed.
--
-----------------------------------------------------------
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__ garabik @ fmph . uniba . sk |
-----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!
More information about the Python-list
mailing list