On Thu, Nov 23, 2017 at 10:05 PM, Chris Angelico <ros...@gmail.com> wrote: > On Fri, Nov 24, 2017 at 8:02 AM, Mikhail V <mikhail...@gmail.com> wrote: >> On Thu, Nov 23, 2017 at 9:39 PM, Chris Angelico <ros...@gmail.com> wrote: >>> On Fri, Nov 24, 2017 at 7:38 AM, Mikhail V <mikhail...@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. > > If you have ANY font-specific "tweaking", you're doing it wrong. > Thanks for making it look worse on everyone else's screen.
Trolling attempt counted :) No I don't have any particular font-specific strategy, it is just my wording reflecting the fact that things look different in different fonts, even among proportional fonts. > >>> 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? > > Which one would you prefer to maintain? Which would you prefer in a code > review? > > Do you want to have one- and two-letter variable names, or longer and > more descriptive ones? > > Seriously? Do I need to wrench this part out of you? This was supposed > to be the EASY question that everyone can agree on, from which I can > then draw my line of argument. >From my above example, you could probably see that I prefer somewhat middle-sized identifiers, one-two syllables. And naturally, they tend to reflect some process/meaining, it is not always achievable, but yes there is such a natural tendency, although by me personally not so strong, and quite often I use totally meaningless names, mainly to avoid visual similarity to already created names. So for very expanded names, it ends up with a lot of underscores :( Mikhail -- https://mail.python.org/mailman/listinfo/python-list