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

Change use constructors instead of functions #1102

Open
simonbyrne opened this issue Sep 3, 2023 · 2 comments
Open

Change use constructors instead of functions #1102

simonbyrne opened this issue Sep 3, 2023 · 2 comments

Comments

@simonbyrne
Copy link
Collaborator

It's a minor thing, but for Dataspaces and Datatypes, it would be nice if we could use the constructors directly instead of going through functions. e.g. Dataspace((4,4)) instead of dataspace((4,4)).

@mkitti
Copy link
Member

mkitti commented Sep 4, 2023

Should we just turn the functions into aliases of the constructors?

@simonbyrne
Copy link
Collaborator Author

In #1104, I changed it so that Dataspace is a basic constructor, but you use dataspace(obj) to get the Dataspace of an object. I think that distinction is helpful, as it can avoid some ambiguities (e.g. getting the dataspace of a tuple)

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

No branches or pull requests

2 participants