Python Forum

Full Version: char == int
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
in the language i was going to create, a single character was going to be equivalent to an int. having learned of better handling of Unicode, it could go all the way to 1114111. a string literal 'a' would be as equivalent to 97 as 0x61 is. appending 97 to a mutable string would be the same as appending 'a'. a mutable string would be the same as a list of ints with values not exceeding 1114111. internally there would be 3 or 4 different ways to store a list of ints. but they would be treated as the same type even if stored a different way.

experience with Python has modified how this language would be just as experience and study of many other past languages has. one thing i'm adding to mine is triple quotes including how they work over multiple lines. and """\e""" == 0x1b.
It doesn't look very attractive. I hope there are other features in the language Rolleyes
there are, depending on the defined value of "features".