Skip to content

Configuration should not use attributes starting with __ to not run into name mangling options. #174

@MaxOstrowski

Description

@MaxOstrowski

I found a mismatch in the Configuration interface when using python.
If this is due to my lacking python skills I'm very sorry.

The following example is given in the API documentation to read the description of the configuration interface:

import sys
import clingo

prg = clingo.Control()
print(prg.configuration.solve.__desc_models)

When using the clingo_main method using an Application

import sys
import clingo

class Application:
    def main(self, prg, files):
        print(prg.configuration.solve.__desc_models)

sys.exit(int(clingo.clingo_main(Application(), sys.argv[1:])))

I do get the following error:

print(prg.configuration.solve.__desc_models)

AttributeError: 'clingo.Configuration' object has no attribute '_Application__desc_models'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions