Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can objects of classes that require an id (where it isn't optional) be created without specifying an id? #117

Closed
sanjayankur31 opened this issue Nov 5, 2021 · 2 comments
Assignees
Labels
T: question Type: question

Comments

@sanjayankur31
Copy link
Contributor

An example is Population, which derives from Base, which means it requires an id. However, I can still run:

pop0 = Population()
pop1 = Population()

neither of them have ids---why is this? Should we be assigning them ids by default, or is something off in nml.py that is allowing this, or are we checking for ids later during validation?

@sanjayankur31
Copy link
Contributor Author

Another related question is: should we be able to define multiple objects with the same id? For python, these are different objects, but for NeuroML, they'll have the same ids?

pop0 = Population(id="1")
pop1 = Population(id="2")

@sanjayankur31
Copy link
Contributor Author

it's perfectly acceptable for users to create empty objects and add ids later, so at the moment we're not going to make it compulsory to add an id right at the time of creation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: question Type: question
Projects
None yet
Development

No branches or pull requests

2 participants