Replies: 1 comment
-
I think it needed to be a literal in the past due to limitations about creating c-strings at compile time. Potentially it would be ok to relax this to any expression which can evaluate at const-time to a c-str. I would be happy to review a PR which experiments with changing the name attribute to accept either a string literal OR an expression which evaluates to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm attempting to use a macro (with the help of paste) to make a class inheritance hierarchy less verbose. What I would ideally like to do is something like this:
Where in this case I would end up with structs named
PyParent
,PyChild1
, &PyChild2
, but which correspond to python classes just namedParent
,Child1
, andChild2
, respectively. But this errors because of thestringify!
usage with "expected string literal".Is there some way to accomplish what I'm trying to do here? Or is there no way to get around the fact that the
#[pyclass(name)]
must be a literalBeta Was this translation helpful? Give feedback.
All reactions