Skip to main content
46 events
when toggle format what by license comment
Aug 12 at 18:06 history edited Thomas Owens CC BY-SA 4.0
Replacing goo.gl link
Apr 10, 2023 at 22:13 comment added gnasher729 In languages other than English there may be many identifiers not covered by ascii, so unicode will come handy there. For example RGB = Rot, Grün, Blau.
Jul 15, 2020 at 6:17 comment added Steve3p0 As someone who is having to code up some maths now, I love it!
Jul 1, 2020 at 18:53 comment added Felipe G. Nievinski uber cool, it's only a matter of time until it catches on: rosettacode.org/wiki/Unicode_variable_names
Jun 16, 2020 at 10:01 history edited CommunityBot
Commonmark migration
Aug 15, 2018 at 14:24 comment added endolith I'm internally debating whether to name a function _sRGB1_to_Jʹaʹbʹ (vs something like _sRGB1_to_J_a_b_ or _sRGB1_to_Jpapbp)...
Aug 10, 2016 at 7:01 comment added badp @gerrit that's an argument to have ² be an built-in, then, rather than a thing you can't have (nevermind that ** can be overridden)
Aug 8, 2016 at 19:55 comment added gerrit Python is right to not permit ² in any variable name. When I see I think x**2. Anything else would be mightily confusing.
Aug 21, 2015 at 13:19 history closed CommunityBot
Ixrec
Bart van Ingen Schenau
gnat
Opinion-based
Aug 15, 2015 at 19:47 review Close votes
Aug 21, 2015 at 13:20
Aug 15, 2015 at 19:18 history protected gnat
Jul 26, 2015 at 23:00 review Close votes
Jul 27, 2015 at 12:59
Sep 14, 2014 at 4:16 answer added Bérenger timeline score: 3
Aug 7, 2014 at 17:02 comment added user40980 OutputStream.🚽;
Jun 15, 2014 at 3:35 answer added rich remer timeline score: -2
Oct 21, 2013 at 2:58 comment added ShreevatsaR Just for the record, I'd like it to be clear that the first code sample (with non-ASCII characters) is perfectly valid Python3 code. Python 3 does support σ and μ and γ and many other characters in variable names, but it doesn't support √. I think the list of allowed identifier characters is described by this and is this.
May 1, 2011 at 11:59 answer added roberto timeline score: 1
Nov 2, 2010 at 10:23 vote accept badp
Nov 1, 2010 at 21:34 comment added badp @David, there's no such distinction in Python. Indeed, sqrt = lambda x: x**.5 gets me a function (more precisely, a callable): sqrt(2) => 1.41421356237.
Nov 1, 2010 at 21:31 comment added David Thornley I find it a very good thing that Python doesn't accept arithmetic operations as variables. A square root sign should denote the operation of taking a square root, and should not be a variable.
Nov 1, 2010 at 18:05 answer added GrandmasterB timeline score: 0
Nov 1, 2010 at 17:58 answer added gbn timeline score: 4
Nov 1, 2010 at 17:16 comment added Bjarke Freund-Hansen @DominicMcDonnell - It is not unreadable or unspeakable at all, read the math out loud and then the code. It actually reads out mostly the same.
Nov 1, 2010 at 16:53 answer added Konrad Rudolph timeline score: 61
Nov 1, 2010 at 15:47 comment added Paul Nathan The ASCII version is far more readable.
Nov 1, 2010 at 15:16 comment added CodexArcanum @badp I mentioned this in my answer, but it was a bit off topic so I'll reiterate it here: you should check out Haskell. It allows you to define your own operators and use basically any symbol for a function name and it has a REPL so you can program interactively like in Python. Although functional programming requires a shift in mindset, I think you'd find it very accommodating to math problems like the one you posted.
Nov 1, 2010 at 14:50 answer added Lie Ryan timeline score: 35
Nov 1, 2010 at 14:45 history edited Victor Hurdugaci
edited tags
Nov 1, 2010 at 14:32 answer added tcrosley timeline score: 2
Nov 1, 2010 at 13:55 answer added dsimcha timeline score: 6
Nov 1, 2010 at 13:26 comment added Peter Boughton Good question, but bad title - I've edited it to something more useful/descriptive, but if anyone thinks it could be improved further...
Nov 1, 2010 at 13:23 history edited Peter Boughton CC BY-SA 2.5
edited title
Nov 1, 2010 at 13:18 answer added back2dos timeline score: -2
Nov 1, 2010 at 12:16 answer added zvrba timeline score: 10
Nov 1, 2010 at 12:09 comment added Vetle Reminds me of an article by Poul-Henning Kamp titled "To move forward with programming languages we need to break free from the tyranny of ASCII.", where he discusses ASCII vs. Unicode in programming languages.
Nov 1, 2010 at 12:09 comment added C. Ross If the lines with μ are valid, then the problem isn't unicode in your code, the problem is that you're using a math symbol (which happens to be from unicode) as a variable name.
Nov 1, 2010 at 12:02 answer added Stephen C timeline score: 2
Nov 1, 2010 at 11:34 answer added LennyProgrammers timeline score: 3
Nov 1, 2010 at 11:23 history edited badp CC BY-SA 2.5
added 416 characters in body; added 4 characters in body
Nov 1, 2010 at 11:21 answer added TheLQ timeline score: 36
Nov 1, 2010 at 11:19 answer added user4051 timeline score: 14
Nov 1, 2010 at 11:08 comment added badp @Sandy Yeah, I ? Unicode.
Nov 1, 2010 at 11:03 comment added Sandeep Kumar M Talking about unicode... codinghorror.com/blog/2008/03/i-entity-unicode.html
Nov 1, 2010 at 10:56 comment added badp @Dominic You should have seen the paper. It's just eight pages...
Nov 1, 2010 at 10:54 comment added Dominique McDonnell That's insane, completely unreadable and unspeakably cool.
Nov 1, 2010 at 10:51 history asked badp CC BY-SA 2.5