Unbound method

faria faria at ppgia.pucpr.br
Tue Jun 22 14:31:31 EDT 1999


Hi everyone!!!

    I'm new in Python and in Brasil we don't wave any book of Python (and
it's very expensive to import!), so I have to ask you all this boring
questions!

    Why it doens't work ?

--- test.py
|
|class A:
|    a = 'Greetings from Brasil!!!'
|    def pa(self):
|        print self.a


Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from test import *
>>> x = A
>>> x.a
'Greetings from Brasil!!!'
>>> x.pa
<unbound method A.pa>
>>>



Henrique Faria
Desenvolvedor Multimídia
LAMI - Laboratório de Mídias Interativas Puc-PR
faria at ppgia.pucpr.br

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Henrique Faria.vcf
Type: text/x-vcard
Size: 436 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19990622/f7400051/attachment.vcf>


More information about the Python-list mailing list