Benefits of unicode identifiers (was: Allow additional separator in identifiers)

Mikhail V mikhailwas at gmail.com
Thu Nov 23 16:02:01 EST 2017


On Thu, Nov 23, 2017 at 9:39 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V <mikhailwas at gmail.com> wrote:
>> I see you manually 'optimise' the look?
>> I personally would end with something like this:
>>
>> def zip_longest(*A, **K):
>>     value = K.get ('fillvalue')
>>     count = len(a) - 1
>>     def sentinel():
>>         nonlocal count
>>         if not count:
>>             raise ZipExhausted
>>         count -= 1
>>         yield  value
>>     fillers = repeat (value)
>>     iterators = [chain (it, sentinel(), fillers) for it in A]
>>     try:
>>         while iterators:
>>             yield tuple (map (next, iterators))
>>     except ZipExhausted:
>>         pass
>>
>>
>> So I would say, my option would be something inbetween.
>> Note that I tweaked it for proportional font, namely Times New Roman.

> I don't see how the font applies here, but whatever.

For a different font, say CourierNew (monospaced) the tweaking strategy might
be different.

> Which is better? The one-letter names or the longer ones that tie in with what they're
> doing?

I think I have answered more or less in previous post, that you cutted off.
So you were not satisfied?
But now I am probably not get your 'better' meaning.
Better for understanding, or purely visually, i.e. less eye-straining?

> Also, why do you have those loose spaces stuck in random places, eg
> before some of the open parentheses but not others?

Is it not allowed? I like how it looks with Times font.


Mikhail



More information about the Python-list mailing list