How does Subclassing Work?
s713221 at student.gu.edu.au
s713221 at student.gu.edu.au
Wed Feb 21 16:59:33 EST 2001
More information about the Python-list mailing list
Wed Feb 21 16:59:33 EST 2001
- Previous message (by thread): base64.decodestring or xmlrpc (in zope) is truncating strings
- Next message (by thread): How does Subclassing Work?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Recently I tried to write a piece of code that subclassed Canvas.py from the Tkinter distribution, where I overwrote CanvasItem. Now I was hoping that all calls to Arc, Line etc. (which weren't overwritten) would call my modified CanvasItem, but it seems they were calling the unmodified CanvasItem - which isn't what I wanted. What I wanted was: My module ______> calls CanvasItem | Canvas.py Arc CanvasItem What I got was: My module CanvasItem Canvas.py Arc _______> calls CanvasItem Other than copy all of Canvas.py into my module and redefine everything, is there a way I can get this to work as expected without rewriting Canvas.py? What I was trying to do was alter Canvas so that I could create classes that would make complex items. Joal Heagney/AncientHart
- Previous message (by thread): base64.decodestring or xmlrpc (in zope) is truncating strings
- Next message (by thread): How does Subclassing Work?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list