31 May
2002
31 May
'02
10:50 a.m.
Peter Bengtsson wrote:
_underscores are often overly used in python by developers who don't understand to use it carefully. self. is tricky yes. When you start integrating your python skills into zope be careful because self can there mean two different things: "self" of python OO syntax and "self" of Zope passing a object as first parameter. It'll get very clear after a little while
Well we can easily turn those two problems into just one: Just use _ insted of self: class underScore: def __init__(_, id, title): _.id = id _.title = title def __str__(_): return _.id + ' ' _.title Voila ... only one confusing issue left in Python regards Max M ;-)