- Notifications
You must be signed in to change notification settings - Fork750
Closed
Description
Environment
- Pythonnet version: 2.3.0
- Python version: 2.7.13
- Operating System: Windows 10
Details
We are trying to create a subclass of System.Object (using namespace) and override the constructor.
For some reason, the conctructor is executed twice when an instance of the class is created. Below is an example that reproduces the problem.
classX(System.Object):__namespace__="PyTest"def__init__(self):print("Running X constructor")x=X()
The output is
Running X constructorRunning X constructor
Metadata
Metadata
Assignees
Labels
No labels