type annotation for kernel-only attributes / Kernel() ? #76

Closed
opened 2021-11-06 17:45:48 +08:00 by sb10q · 2 comments
Owner

Current proposal for handling the various kinds of attributes:
M-Labs/nac3-spec#5 (comment) (and comments below it)

Question:
For kernel-only attributes (y in the example), should we just annotate the type (int in the example) or wrap in Kernel (use Kernel(int) in the example)?

The advantage to using Kernel() would be that regular CPython type annotations are still supported (with no unusual effects), and also things are more explicit. But it is more typing for the user.

Current proposal for handling the various kinds of attributes: https://git.m-labs.hk/M-Labs/nac3-spec/issues/5#issuecomment-2003 (and comments below it) Question: For kernel-only attributes (``y`` in the example), should we just annotate the type (``int`` in the example) or wrap in ``Kernel`` (use ``Kernel(int)`` in the example)? The advantage to using ``Kernel()`` would be that regular CPython type annotations are still supported (with no unusual effects), and also things are more explicit. But it is more typing for the user.
sb10q added the
high-priority
label 2021-11-06 17:45:48 +08:00
Contributor

This should not be hard to implement anyway.

This should not be hard to implement anyway.
Author
Owner

If nobody else has an opinion on this, let's do Kernel[].

If nobody else has an opinion on this, let's do ``Kernel[]``.
sb10q added this to the Prealpha milestone 2021-11-19 16:51:00 +08:00
sb10q removed this from the Prealpha milestone 2021-11-19 16:52:54 +08:00
sb10q added this to the Prealpha milestone 2021-12-03 12:01:18 +08:00
ychenfo was assigned by sb10q 2021-12-03 12:08:35 +08:00
sb10q closed this issue 2021-12-19 11:05:03 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#76
No description provided.