Python 3, an illustrated tour Transcripts
Chapter: Strings
Lecture: Unicode Variable Names

Login or purchase this course to watch this video and the rest of the course contents.
0:01 This video will talk about Unicode identifiers.
0:03 These came out in Python 3, and pep 3131 introduced them.
0:08 The pep states: by using identifiers in their native language
0:12 code clarity and maintainability of the code
0:14 among speakers of that language improves.
0:17 What does this mean? It means that I can use a unicode character
0:20 such as Ω I can say the Ω_val=10
0:25 if I'm talking about resistance or whatnot
0:27 and then I can ask for that variable and Python 3 will give that to me.
0:31 Note that Python 2 does not like this and this won't work in Python 2.
0:36 Still have some issues, you can't start a variable with a number
0:40 so I can't say to 2Ω_val, I'll get a syntax error there.
0:44 That's basically all I have to say about unicode variables.
0:47 I personally haven't seen them that often.
0:49 I'm in the United States and I mostly deal in an ASCII centric world.
0:54 One other thing that the pep notes
0:56 is that the Python language isn't going to use unicode variables either.
0:59 So even though the language supports it
1:01 and an effort to make things simpler and easier for everyone to type and understand
1:05 it's just going to stick with ASCII variables.
1:09 So I personally haven't seen anyone using this feature, though it's out there.
1:13 So if you've got a cool example, I'd love to see it.
1:16 Hit me up on Twitter or whatnot and let me know
1:18 of a useful example where this is being used.