A Novice Class Question.

Mauro mauro at mr-potatohead.com
Wed Aug 28 02:11:45 CEST 2002

Hello to all,

I was trying to make a function and all right. But when I try to put
this function below of a class, I'm having some troubles... The
example is down.


class Conjs:
    def NewList(a = list(), b = list()):
        print a
        print b

When I run, I type this: Conjuntos.Conjs.NewList([0,1], [2,3])
This is the message of error: 

TypeError: unbound method NewList() must be called with Conjs instance
as first argument (got list instance instead)


More information about the Python-list mailing list