matus valo via cython-devel schrieb am 15.02.25 um 00:07:
Another question popped in my mind. How we will deal with:
Introduce new `cython` command parameter `--shared` which will take fully
qualified module name:
When we will introduce new `--shared` option we will have 3 places where we
can specify shared module ffully qualified module name:
1. New Cython parameter `--shared` foo.bar
2. Cython Directive parameter: `-X use_shared_utility=foo.bar
3. Cython module comment: `# cython: use_shared_utility=foo.bar
What is the priority between 1., 2. and 3.? I suppose 1. and 2. should
override 3. But what we should do if 1. and 2. are set but have different
values?
In general, changing the code is not for everyone, passing a CLI option is
easy. We should therefore prefer the CLI option over the code if both are
available. Passing a different CLI option to test something out seems quick
and easy, so contradictions should be fine and the CLI option should just win.
Passing two options on the command line is usually resolved by letting the
last one win. I think that's fine in this case as well. The "--shared"
option would just set the directive, and setting the directive with "-X"
would then change the directive value again (and vice versa).
Stefan
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel