Replies: 4 comments 1 reply
-
At first sight I thought this looks interesting, but at second thought, in-place modifications like this usually come with pitfalls & surprises. (BTW: I'd definitely delete the copy & move constructor & operator in the tensorstore implementation; it'll be surprising and bug-prone if the object is accidentally copied or moved.) I think it would be safer and more obvious to create a
or
Then use |
Beta Was this translation helpful? Give feedback.
-
This is an OSS project. Try! |
Beta Was this translation helpful? Give feedback.
-
@rwgk Am I on the right track if I put: struct strip_leading_underscore_from_name;
static module_ make_alias(const char *name) {
module_ ret = *this;
ret.attr("__name__") = this.attr(name);
return ret;
}
static module_ make_alias(strip_leading_underscore_from_name) {
auto name = ??
return this->make_alias(name);
} as members of |
Beta Was this translation helpful? Give feedback.
-
Here is my (potentially naive ;)) try : #3761 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a set of functions written in C++ that I compile in a module
_foo
.My python module simply imports all functions from it. I.e.
foo/__init__.py
readsThis was giving issues with my documentation. And I got the suggestion sphinx-doc/sphinx#10199 to use:
See https://github.com/google/tensorstore/blob/94be4f2e8715511bb60fc0a0eaf07335881673b3/python/tensorstore/tensorstore.cc#L75
It would be great if this could be incorporated as option in pybind11 !
Beta Was this translation helpful? Give feedback.
All reactions