Issue 13855: Add qualname support to types.FunctionType (original) (raw)

As mentioned in currently there is no way to specify a qualname on types.FunctionType:

def f(): ... def g(): ... pass ... return g ... g = f() g <function f..g at 0x7f1dac4d8ba0> types.FunctionType(f.code, {}) <function f at 0x7f1dac4dfae0> types.FunctionType(g.code, {})

If is fixed, then the qualname can be derived from the passed in code object like name is. We can also add an optional parameter to the FunctionType constructor for qualname.

I am working on a patch relative to the one I just posted for .