On Tuesday, March 25, 2014 8:47:35 AM UTC+5:30, Chris Angelico wrote: > On Tue, Mar 25, 2014 at 2:00 PM, Rustom Mody wrote: > > Yeah: Its 2014 (at least out here)... > > About time we started using unicode in earnest dont you think??
> We do. > > Id like to see the following spellings corrected: > > lambda to λ > > in to ∈ > > (preferably with the 'in' predicate and the 'in' in 'for' disambiguated) > > set([]) to ∅ > The problems with these is not Unicode or a lack thereof, but keys. I > know how to type "lambda" on any keyboard I reach for; if it's a > full-sized QWERTY variant, I can type it without looking, and if it's > something else then I can peer at the thing and find the appropriate > five letters. (Phone keyboards are notoriously peer-worthy.) How do I > type λ? Do I have to memorize an alt-key sequence? Do I need to keep a > set of "language keywords" in a file somewhere so I can copy and > paste? Does my editor have to provide them? > What is really gained by using the short-hand? It becomes nigh > ungoogleable; yes, you can paste λ into Google and find out that it's > called lambda (and, if Python used that as a keyword, you could type > "λ python" into Google and get to the docs), but how do you figure out > which part of this to search for? > sockets.sort(key=λdata:data[1]) > More likely you'd search for "sockets" or "sort" or maybe "key" or > "data", but you wouldn't expect to search for the symbol. > > And some parentheses disambiguation > > Internal ambiguity: Is '(...)' a paren? a function? a tuple? > > External ambiguity: {} in python vs in set theory > I don't know about the difference between {} in set theory and Python, > but the multiple uses of () actually boil down to two: In set theory {} makes sets In python {} makes dictionaries > 1) Grouping, which includes tuples; there's a special case whereby > grouping nothing makes a zero-item tuple, but everything else is just > the comma > 2) Functions (both definition and call) > Disambiguating them might be of some small value, but since they're > the same in pretty much every language under the sun, it would feel What 'they'?? I dont get: If you are talking of disambiguating function definition and call -- yeah thats overkill If you are talking of overlap between tuples parentheses and function (call) well consider f(x,y) vs f((x,y)) vs (x,y) vs ((x,y)) Paren vs tuples: why do we need to write (x,) not (x) All this is because () is doing triple-duty -- https://mail.python.org/mailman/listinfo/python-list