C-style characters

8 views
Skip to first unread message

whoami730

unread,
Oct 1, 2025, 3:45:53 PM (2 days ago) Oct 1
to cython-users
I see no mention of "C-style characters" or "byte objects" or anything similar of sort in any documentation. 
What exactly is the name given to `c' '` in the below code snippet -

```
cdef char* x = s
while x[0] == c' ':
    x += 1  # Strip spaces
```

da-woods

unread,
Oct 2, 2025, 12:33:23 PM (yesterday) Oct 2
to cython...@googlegroups.com

They will get translated into a character literal in C (i.e ' ').  I don't think we have a specific name for the feature in Cython.

If you think we're missing documentation for it then a PR would be welcome.

David

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cython-users/bf561515-2a6e-4150-8d46-6ca4a24ca733n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages