Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
perf: Fix issues with
Chart|LayerChart.encode
, 1.32x speedup toinfer_encoding_types
#3444perf: Fix issues with
Chart|LayerChart.encode
, 1.32x speedup toinfer_encoding_types
#3444Changes from 5 commits
31dedc8
0b19a34
0eb139d
92d4ac3
e4ab705
fe736f9
0e0e167
064039d
0869b6c
dbe8a74
be472e6
f8dd748
8fa65d7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the first time I see a forward slash,
/
as argument within a function. Can you explain what that does?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @mattijn
/
is a marker for positional-only parameters. Any parameter to the left of/
is positional-only, and may not be used by name.In this case, calling
self._wrap_in_channel(encoding="enc", obj=[1,2,3])
raises aTypeError
. The python tutorial docs may be helpful for an overview as well.Personally, I like to use
/
in cases like:_wrap_in_channel
could logically be thought of as having parameters_wrap_in_channel(wrappee, wrapper)
.Looking back at PEP570, I see that this was introduced in
python3.8
, which may explain the feature's absence inaltair
until now.Hope all of that was helpful