[Zope] Easy my *$%&#@$%!

Max M maxm@mxm.dk
Fri, 31 May 2002 12:50:11 +0200


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


;-)