newbie class question

Justin Sheehy dworkin at ccs.neu.edu
Sun Aug 13 20:28:22 EDT 2000


"Ron Johnson, Jr." <ronjohn at gs.verio.net> writes:

> >>> class MyClass:
> ...     i = 12345
> ...     def f(x):
> ...             return 'hello world'

> >>> print x.f(1)
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> TypeError: unbound method must be called with class instance 1st argument





More information about the Python-list mailing list