Defining Python class methods in C

Bryan belred1 at
Sun Mar 23 01:16:22 CET 2003

i changed my start function to print some more details.

def start(ctx):
	print 'context', ctx 
	print dir(ctx)
	print 'ctx.__doc__:', ctx.__doc__, '*'
	print 'ctx.get_path.__doc__:', ctx.get_path.__doc__, '*'
	print 'callable(ctx.get_path)', callable(ctx.get_path), '*'
	print 'ctx.get_path()', ctx.get_path(), '*'

it looks like ctx can see that it's a Context object and can see that
get_path is callable, but the c code get_path never get's called.

context <?.Context instance at 0x00AFC4C0>
['__doc__', '__init__', 'get_path']
ctx.__doc__: None *
ctx.get_path.__doc__: Get the path *
callable(ctx.get_path) 1 *


More information about the Python-list mailing list