Posts: 4,647
Threads: 1,494
Joined: Sep 2016
is there an unused character in Python? i'm looking for a character i won't see outside of quotes that i can drop into my code for some source processing that will end up being removed in the code output of that processing. something that can be in the code but will never exist in a double form would be an alternative. obviously i can't use double / for this, or even double *. but, maybe double % could be used, for example.
any ideas? maybe a ??
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
Oct-23-2022, 03:48 AM
(This post was last modified: Oct-23-2022, 03:48 AM by Skaperen.)
(Oct-22-2022, 08:05 AM)wavic Wrote: A dollar sign?
that would be usable for my processing. thank you! are you 100% sure there is no use of this character in Python source syntax (not counting inside any string)?
i have in a few cases mistyped # as $ (adjacent key on a US qwerty keyboard) and have always gotten a syntax error for it. and no, this processing is not for fixing typos.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
i have been rethinking my development and early designs. Unicode certainly adds a lot of possibilities. a partial need if this idea is to be able t type this, manually. that would mean a limited scope of keyboards.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
the limited scope of keyboards is for others to type something special. i personally have ways to get any of Unicode's 1114112 characters into my files, and even more than that.
i do like
$ as most people know how to do that, as opposed to a grinning smiley face that does not appear on their keyboard.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,647
Threads: 1,494
Joined: Sep 2016
the $ would be typed by the coder along with some defined other stuff and end by a final $ to specify something to be done by processing the code. that stuff will be removed from the modified code. so, the output will have no $ unless the action specifies to do so (there will be a flag to repeat processing).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.