what is self._base?
Benjamin Tai
bt98 at doc.ic.ac.uk
Fri Dec 14 07:10:56 EST 2001
Hi,
I have come across the following statement in a constructor (Programming
Python by Mark Lutz). After extending a type in C (stacktype), it is
wrapped by a Python class (Stack).
import stacktype
class Stack:
def __init__(self, start=None):
self._base = start or stacktype.Stack()
However I can't find any documents/explanation for the following:
1) What is "_base"
2) What is "start=None"
3) Why can't I just write "self = stacktype.Stack()"
Any help for this newbie would be appreciated.
Ben
More information about the Python-list
mailing list