A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/096366.html below:

Defining a code object from a function

Defining a code object from a function Defining a code object from a functionNeil Benn neil.benn at cambridgeantibody.com
Thu Apr 5 11:35:04 EDT 2001
Hello,

            I have a class as follows:-


class plate:

    NoColumns = 0
    NoRows = 0

    currentRow = 0

    def __init__(self):
        print "creating plate"
        print "created plate"

    def hasMoreRows(self):
        if currentRow < noRows:
            return 1ist
        else:
            return 0

    def nextRow(self):
        self.currentRow = self.currentRow + 1
        return self.currentRow

    I'm using the inspect module to get information about the method
arguments back.

However...................

My problem is that the getargs methods of inspect want a code object.
Looking through the docs on Python.org I can't work out how to convert a
method call to a code object so that I can then get the arguments back.

    Please could someone advise me, pretty please?

Cheers,

Neil Benn
Automation Informatics Scientist
CaT



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4