when and how do you use Self?
bruno at modulix
onurb at xiludom.gro
Thu Nov 3 17:23:44 CET 2005
Chris Cioffi wrote:
as a point of style, top-posting is a Bad Thing(tm)
> On 03/11/05, bruno at modulix <onurb at xiludom.gro> wrote:
>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>>I am new to python,
>>>Could someone explain (in English) how and when to use self?
>>Don't use self. Use other.
> As a point of style: the 'other' identifier should only be used in
> Zen Metaclass programming as an implicit reference to the calling
> object or as a list of references to all other instances of the class.
As a point of style, if it refers to a list, it should be 'others' and
Also, this was supposed to be a joke. I can well understand that my sens
of humour is somewhat disastrous and that this was not a _good_ joke,
but "context should have made both clear and obvious" that it was one.
> Context will make it both clear and obvious which use case is
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list